8283848586878889909192
*/ 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; }
57335734573557365737573857395740574157425743
try { FileConnection file = (FileConnection) Connector.open("file:///root1/char.bin"); try { if (!file.exists()) { file.create(); file.truncate(0); } DataOutputStream out = file.openDataOutputStream(); try {
104105106107108109110111112113114
if (fcon2.exists()) { continue; } try { fcon2.create(); } catch (final Exception e) { throw new IOException("unable to create " + fileURL + ": " + e); }
121122123124125126127128129130131
(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);