Package javax.microedition.io.file

Examples of javax.microedition.io.file.FileConnection.create()


     */
    public OutputStream openOutputStream() throws IOException
    {
        final FileConnection connection = (FileConnection)Connector.open( PREFIX + path_ );
        if( !connection.exists() )
            connection.create();
        final OutputStream stream = connection.openOutputStream();
        connection.close();
        return stream;
    }

View Full Code Here


        try {
            FileConnection file =
                    (FileConnection) Connector.open("file:///root1/char.bin");
            try {
                if (!file.exists()) {
                    file.create();
                    file.truncate(0);
                }
                DataOutputStream out = file.openDataOutputStream();

                try {
View Full Code Here

                        if (fcon2.exists()) {
                            continue;
                        }

                        try {
                            fcon2.create();
                        } catch (final Exception e) {
                            throw new IOException("unable to create " + fileURL
                                    + ": " + e);
                        }
View Full Code Here

                                    (FileConnection) Connector.open(FILE_NAME
                                            + _counter + EXTENSION);
                        }

                        // We know the file doesn't exist yet, so create it
                        file.create();

                        // Write the image to the file
                        final OutputStream out = file.openOutputStream();
                        out.write(_raw);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.