|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.funambol.syncml.client.FileObjectOutputStream
public class FileObjectOutputStream
This class represents a stream into which a file object can be written directly. It is responsibility of this stream to separate the meta information from the real file content. The user can simply stream bytes as they arrive from a file object source into this output stream. When the "body" of the item starts, then its content is written into an output stream that must be provided to this class. After the stream is closed, the user can ask for a FileObject which contains all the file object meta data.
Constructor Summary | |
---|---|
FileObjectOutputStream(FileObject fo,
java.io.OutputStream os)
Builds the output stream. |
Method Summary | |
---|---|
void |
close()
Close the output stream. |
void |
flush()
Flushes the underlying stream. |
FileObject |
getFileObject()
Get the file object descrption (meta information). |
void |
write(int b)
Writes a single byte into the stream. |
Methods inherited from class java.io.OutputStream |
---|
write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileObjectOutputStream(FileObject fo, java.io.OutputStream os)
fo
- is the file object which is filled with the meta information
which comes into the streamos
- is the output stream into which the file object body is written
intoMethod Detail |
---|
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- the byte write
java.io.IOException
- if the operation cannot be performed. This can be due
to several reasons, including a failure of the underlying output stream
or an invalid file object content that cannot be parsed.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
- if the operation cannot be performed. Either because
the underlying output stream has a failure or because the the meta
information cannot be parsed properly.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public FileObject getFileObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |