public class RandomAccessFileOutputStream extends 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) | 
close, flush, writepublic RandomAccessFileOutputStream(RandomAccess raf) throws IOException
raf - The file to write to.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 IOException
write in class OutputStreamIOExceptionpublic void write(int b)
           throws IOException
write in class OutputStreamIOExceptionpublic COSBase getExpectedLength()
public void setExpectedLength(COSBase value)
value - The expected value.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.