Note
We assume that only one thread is writing to the file at a time.
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private RandomAccessFile | |
| private final long | |
| private final WritableSharedFile |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | close()
Overrides java. Implements java. |
| public synchronized InputStream | |
| public void | write(int
the b)byte.Implements abstract java. |
| public void | write(byte[]
the data. b)Overrides java. b.length bytes from the specified byte array
to this output stream.
|
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified byte array
starting at offset off to this output stream.
|
| end | back to summary |
|---|---|
| private long end | |
| raf | back to summary |
|---|---|
| private RandomAccessFile raf | |
| start | back to summary |
|---|---|
| private final long start | |
| tf | back to summary |
|---|---|
| private final WritableSharedFile tf | |
| AppendStream | back to summary |
|---|---|
| public AppendStream(WritableSharedFile tf) throws IOException | |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| getInputStream | back to summary |
|---|---|
| public synchronized InputStream getInputStream() throws IOException | |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |