Search in sources :

Example 11 with BufferedOutputStream

use of com.codename1.io.BufferedOutputStream in project CodenameOne by codenameone.

the class BlackBerryImplementation method openOutputStream.

/**
 * @inheritDoc
 */
public OutputStream openOutputStream(Object connection, int offset) throws IOException {
    FileConnection fc = (FileConnection) Connector.open((String) connection, Connector.READ_WRITE);
    if (!fc.exists()) {
        fc.create();
    }
    BufferedOutputStream o = new BufferedOutputStream(fc.openOutputStream(offset), (String) connection);
    o.setConnection(fc);
    return o;
}
Also used : BufferedOutputStream(com.codename1.io.BufferedOutputStream) FileConnection(javax.microedition.io.file.FileConnection)

Aggregations

BufferedOutputStream (com.codename1.io.BufferedOutputStream)10 OutputStream (java.io.OutputStream)4 FileConnection (javax.microedition.io.file.FileConnection)4 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 FileOutputStream (java.io.FileOutputStream)2 CodenameOneImplementation (com.codename1.impl.CodenameOneImplementation)1 FontFormatException (java.awt.FontFormatException)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 DataOutputStream (java.io.DataOutputStream)1 EOFException (java.io.EOFException)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 RandomAccessFile (java.io.RandomAccessFile)1 SQLException (java.sql.SQLException)1 ParseException (java.text.ParseException)1 ArrayList (java.util.ArrayList)1 Vector (java.util.Vector)1 HttpConnection (javax.microedition.io.HttpConnection)1