@NotThreadSafe public abstract class GridFSUploadStream extends OutputStream
Provides the id
for the file to be uploaded as well as the write
methods of a OutputStream
This implementation of a OutputStream
will not throw IOException
s. However, it will throw a
MongoException
if there is an error writing to MongoDB.
Constructor and Description |
---|
GridFSUploadStream() |
Modifier and Type | Method and Description |
---|---|
abstract void |
abort()
Aborts the upload and deletes any data.
|
abstract void |
close() |
void |
flush() |
abstract ObjectId |
getFileId()
Gets the
ObjectId for the file to be uploaded |
abstract void |
write(byte[] b) |
abstract void |
write(byte[] b,
int off,
int len) |
abstract void |
write(int b) |
public abstract ObjectId getFileId()
ObjectId
for the file to be uploadedpublic abstract void abort()
public abstract void write(int b)
write
in class OutputStream
public abstract void write(byte[] b)
write
in class OutputStream
public abstract void write(byte[] b, int off, int len)
write
in class OutputStream
public void flush()
flush
in interface Flushable
flush
in class OutputStream
public abstract void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream