public class FilesystemOutputStream
extends java.io.OutputStream
OutputStream
for STRING and PROGRAM files.FilePosition.getOutputStream()
Constructor and Description |
---|
FilesystemOutputStream(FilePosition p_fpos)
Constructor from a
FilePosition . |
FilesystemOutputStream(FilePosition p_fpos,
boolean p_buffered)
Constructor from a
FilePosition . |
Modifier and Type | Method and Description |
---|---|
void |
close()
close() closes the FilePosition associated with this
FilesystemOutputStream.
|
void |
flush()
flush() flushes the buffers to the Filesystem.
|
void |
write(byte[] b)
Writes
b.length bytes from b to the
FilePosition. |
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from b starting at offset
off . |
void |
write(int b)
Writes one byte to the file at a time.
|
public FilesystemOutputStream(FilePosition p_fpos) throws FilesystemException
FilePosition
.p_fpos
- FilePosition
to write to.FilesystemException
public FilesystemOutputStream(FilePosition p_fpos, boolean p_buffered) throws FilesystemException
FilePosition
.p_fpos
- FilePosition
to write to.p_buffered
- If writes should be buffered.FilesystemException
public void write(byte[] b) throws java.io.IOException
b.length
bytes from b
to the
FilePosition.write
in class java.io.OutputStream
b
- the byte array from which to write.java.io.IOException
- If writing to the FilePosition causes an
exception to be thrown.public void write(byte[] b, int off, int len) throws java.io.IOException
len
bytes from b
starting at offset
off
.write
in class java.io.OutputStream
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.java.io.IOException
- If writing to the FilePosition causes an
exception to be thrown.public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- the byte to write.java.io.IOException
- If writing to the FilePosition causes an
exception to be thrown.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
- if an error occurs while closing the
FilePosition.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException