Package net.rim.device.api.util

Examples of net.rim.device.api.util.ByteVector


                cacheItemObj = cacheItemStore.getContents( codeSigningKey );
            } catch ( ControlledAccessException ignore ) {
                // cacheItemObj remains null
            }
            if( cacheItemObj instanceof ByteVector ) {
                ByteVector cacheItemVector = (ByteVector) cacheItemObj;
                data = cacheItemVector.getArray();
            }
        }

        if( data != null ) {
            // Create InputStream
View Full Code Here


                cacheItemObj = cacheItemStore.getContents( codeSigningKey );
            } catch ( ControlledAccessException ignore ) {
                // cacheItemObj remains null
            }
            if( cacheItemObj instanceof ByteVector ) {
                ByteVector cacheItemVector = (ByteVector) cacheItemObj;
                data = cacheItemVector.getArray();
            }
        }
       
        if( data != null ) {
            // Create InputStream
View Full Code Here

        try {
            final BrowserFieldRequest bfReq = new BrowserFieldRequest(uri);
            ic = bfController.handleResourceRequest(bfReq);
            is = ic.openDataInputStream();
           
            final ByteVector bmpBytes = new ByteVector();
            try {
                while(true) {
                    bmpBytes.addElement(is.readByte());
                }
            } catch(EOFException e) {
            }
           
            return bmpBytes.getArray();
        } finally {
            try {
                ic.close();
            } catch(Exception e) { }
           
View Full Code Here

        try {
            BrowserFieldRequest bfr = new BrowserFieldRequest( args[ 0 ].toString() );
            ic = ((BrowserFieldController)_weakReferenceBrwoserFieldController.get()).handleResourceRequest( bfr );

            dis = ic.openDataInputStream();
            ByteVector vc = new ByteVector();

            for( int b = dis.read(); b != -1; b = dis.read() ) {
                vc.addElement( (byte) b );
            }

            // An application could have multiple entry points and each entry point has its own icon.
            // We need to update icons for all entry points to be the same one.
            Bitmap image = Bitmap.createBitmapFromBytes( vc.getArray(), 0, vc.size(), 1 );
            ApplicationDescriptor current = ApplicationDescriptor.currentApplicationDescriptor();
            int moduleHandle = current.getModuleHandle();
            ApplicationDescriptor[] descriptors = CodeModuleManager.getApplicationDescriptors( moduleHandle );
           
            if( args.length == 1 || !( (Boolean) args[ 1 ] ).booleanValue() ) {
View Full Code Here

TOP

Related Classes of net.rim.device.api.util.ByteVector

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.