public class RandomAccessFileOutputStream
extends java.io.OutputStream
| Constructor and Description |
|---|
RandomAccessFileOutputStream(RandomAccess raf)
Constructor to create an output stream that will write to the end of a
random access file.
|
| Modifier and Type | Method and Description |
|---|---|
COSBase |
getExpectedLength()
This will get the length that the PDF document specified this stream
should be.
|
long |
getLength()
The number of bytes written or expected in the stream.
|
long |
getLengthWritten()
Get the amount of data that was actually written to the stream, in theory this
should be the same as the length specified but in some cases it doesn't match.
|
long |
getPosition()
This will get the position in the RAF that the stream was written
to.
|
void |
setExpectedLength(COSBase value)
This will set the expected length of this stream.
|
void |
write(byte[] b,
int offset,
int length) |
void |
write(int b) |
public RandomAccessFileOutputStream(RandomAccess raf) throws java.io.IOException
raf - The file to write to.java.io.IOException - If there is a problem accessing the raf.public long getPosition()
public long getLengthWritten()
public long getLength()
public void write(byte[] b,
int offset,
int length)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic COSBase getExpectedLength()
public void setExpectedLength(COSBase value)
value - The expected value.