Package com.sun.star.lib.sandbox

Examples of com.sun.star.lib.sandbox.ResourceProxy


    public native void showDocument( URL url, String aTarget );
    public native void showStatus( String status );
    */
   
    public AudioClip getAudioClip(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        AudioClip audioClip = resourceProxy.getAudioClip();

    return audioClip;
    }
View Full Code Here


    return audioClip;
    }

    public Image getImage(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        Image image = toolkit.createImage(resourceProxy.getImageProducer());
   
    return image;
    }
View Full Code Here

    _applet = null;
    }
   
    private void loadArchive(String archive) throws MalformedURLException, IOException {
    ResourceProxy jarResourceProxy = ResourceProxy.load(new URL(_baseURL, archive), null /*_protectionDomain*/);
    jarResourceProxy.loadJar(_baseURL);
    _jarResourceProxys.addElement(jarResourceProxy);
    }
View Full Code Here

    public native void showDocument( URL url, String aTarget );
    public native void showStatus( String status );
    */
   
    public AudioClip getAudioClip(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        AudioClip audioClip = resourceProxy.getAudioClip();

    return audioClip;
    }
View Full Code Here

    return audioClip;
    }

    public Image getImage(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        Image image = toolkit.createImage(resourceProxy.getImageProducer());
   
    return image;
    }
View Full Code Here

            try {
        aCB.write( aDestStm );

        byte aClassdata[] = aTmpStm.toByteArray();

        ResourceProxy resource = ResourceProxy.create(new URL("http:/" + aClassName.replace('.', '/') + ".class"),
                                aClassdata,
                                null);
        pClass = aLoader.loadClass(aClassName);
      }
      catch(MalformedURLException malformedURLException) {
View Full Code Here

    _applet = null;
    }
   
    private void loadArchive(String archive) throws MalformedURLException, IOException {
    ResourceProxy jarResourceProxy = ResourceProxy.load(new URL(_baseURL, archive), null /*_protectionDomain*/);
    jarResourceProxy.loadJar(_baseURL);
    _jarResourceProxys.addElement(jarResourceProxy);
    }
View Full Code Here

    public native void showDocument( URL url, String aTarget );
    public native void showStatus( String status );
    */
   
    public AudioClip getAudioClip(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        AudioClip audioClip = resourceProxy.getAudioClip();

    return audioClip;
    }
View Full Code Here

    return audioClip;
    }

    public Image getImage(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        Image image = toolkit.createImage(resourceProxy.getImageProducer());
   
    return image;
    }
View Full Code Here

      /*
      ** Der ResourceProxy muss innerhalb des Scopes des ClassLoaders sein,
      ** da anderfalls der Proxy vom GC eventuell schon freigegeben wurde und
      ** die aus dem Archive gezogenen Resourcen schon weg sind.
      */
      ResourceProxy resourceProxy = null;

            if ( atts != null ) {
            String jarFiles = (String) atts.get( "archive" );
            String codeBase = (String) atts.get( "codeBase" );
            String useMain = (String) atts.get( "useMain" );

            workDir = (String) atts.get( "workDir" );

            if ( codeBase != null ) {
              URL url = new URL( codeBase );
              if (url.getProtocol().equals("file")) {
                  pLoader = ClassContextProxy.create(url, null, null); // Security ausschalten
                }
          else {
                  pLoader = ClassContextProxy.create(url, null, null);
                }
              }
        else if ( jarFiles != null ) {
          try {
            pLoader = ClassContextProxy.create(new URL("http://"), null, null);
          }
          catch(MalformedURLException e) {}
              }
              if (useMain != null) {
                bDoMain = true;
              }

            if( jarFiles != null ) {
              StringTokenizer st = new StringTokenizer(jarFiles, ",", false);

              while (st.hasMoreTokens()) {
                String tok = st.nextToken().trim();
           
            try {
              resourceProxy = ResourceProxy.load(new URL(pLoader.getBase(), tok), null);
              resourceProxy.loadJar(pLoader.getBase());
            }
            catch(java.io.IOException iOException) {
              System.err.println("Archive not found:" + iOException);
            }
              }
View Full Code Here

TOP

Related Classes of com.sun.star.lib.sandbox.ResourceProxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.