Package com.basis.filesystem
Class FilesystemOutputStream
java.lang.Object
java.io.OutputStream
com.basis.filesystem.FilesystemOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
OutputStream for STRING and PROGRAM files.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFilesystemOutputStream(FilePosition p_fpos) Constructor from aFilePosition.FilesystemOutputStream(FilePosition p_fpos, boolean p_buffered) Constructor from aFilePosition. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close() closes the FilePosition associated with this FilesystemOutputStream.voidflush()flush() flushes the buffers to the Filesystem.voidwrite(byte[] b) Writesb.lengthbytes frombto the FilePosition.voidwrite(byte[] b, int off, int len) Writeslenbytes frombstarting at offsetoff.voidwrite(int b) Writes one byte to the file at a time.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
FilesystemOutputStream
Constructor from aFilePosition.- Parameters:
p_fpos-FilePositionto write to.- Throws:
FilesystemException
-
FilesystemOutputStream
Constructor from aFilePosition.- Parameters:
p_fpos-FilePositionto write to.p_buffered- If writes should be buffered.- Throws:
FilesystemException
-
-
Method Details
-
write
Writesb.lengthbytes frombto the FilePosition.- Overrides:
writein classOutputStream- Parameters:
b- the byte array from which to write.- Throws:
IOException- If writing to the FilePosition causes an exception to be thrown.
-
write
Writeslenbytes frombstarting at offsetoff.- Overrides:
writein classOutputStream- Parameters:
b- the byte to write.off- the offset in the byte array from which to write.len- the number of bytes to write from the byte array.- Throws:
IOException- If writing to the FilePosition causes an exception to be thrown.
-
write
Writes one byte to the file at a time.- Specified by:
writein classOutputStream- Parameters:
b- the byte to write.- Throws:
IOException- If writing to the FilePosition causes an exception to be thrown.
-
close
close() closes the FilePosition associated with this FilesystemOutputStream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- if an error occurs while closing the FilePosition.
-
flush
flush() flushes the buffers to the Filesystem.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-