|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.apache.pdfbox.io.RandomAccessFileOutputStream
public class RandomAccessFileOutputStream
This will write to a RandomAccessFile in the filesystem and keep track of the position it is writing to and the length of the stream.
| Constructor Summary | |
|---|---|
RandomAccessFileOutputStream(RandomAccess raf)
Constructor to create an output stream that will write to the end of a random access file. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.io.OutputStream |
|---|
close, flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomAccessFileOutputStream(RandomAccess raf)
throws IOException
raf - The file to write to.
IOException - If there is a problem accessing the raf.| Method Detail |
|---|
public long getPosition()
public long getLengthWritten()
public long getLength()
public void write(byte[] b,
int offset,
int length)
throws IOException
write in class OutputStreamIOException
public void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic COSBase getExpectedLength()
public void setExpectedLength(COSBase value)
value - The expected value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||