Package com.sun.midp.io.j2me.storage

Examples of com.sun.midp.io.j2me.storage.RandomAccessStream


    private static byte[] getResourceImpl(SecurityToken token,
            String resourceFilename) {
        token.checkIfPermissionAllowed(Permissions.MIDP);

        byte[] resourceBuffer = null;
        RandomAccessStream stream = new RandomAccessStream(token);

        try {
            stream.connect(resourceFilename, Connector.READ);
            resourceBuffer = new byte[stream.getSizeOf()];
            stream.readBytes(resourceBuffer, 0, resourceBuffer.length);
        } catch (java.io.IOException e) {
            resourceBuffer = null;
        } finally {
            try {
                stream.disconnect();
            } catch (java.io.IOException ignored) {
            }
        }

        return resourceBuffer;
View Full Code Here

TOP

Related Classes of com.sun.midp.io.j2me.storage.RandomAccessStream

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.