Package org.faceless.pdf2
Interface Cache.Entry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the Entry.BackedInputStream
getInputStream()
Return an InputStream to read from this Entry.java.io.OutputStream
getOutputStream()
Return an OutputStream to write to this Entry.int
size()
Return the size of this Entries buffer in bytesvoid
writeTo(java.io.OutputStream out)
Write the entire contents of this Entry to the specifiedOutputStream
.
-
-
-
Method Detail
-
getOutputStream
java.io.OutputStream getOutputStream()
Return an OutputStream to write to this Entry. Writes to theOutputStream
don't have to be synchronised as it's assumed that only one thread will write to one item at a time. This method will be called repeatedly for the same Entry, and it's essential that the same object is returned each time. No further calls will be made to this method afterclose()
has been called.
-
getInputStream
BackedInputStream getInputStream()
Return an InputStream to read from this Entry. A newInputStream
should be returned every time this method is called, as it may be called more than once in different threads (when reusing an image across threads, for example). Unless the stream is returned directly to the user (as in thePDFAbstractMap.getStream(java.lang.String)
method), this stream will be closed by the library.
-
writeTo
void writeTo(java.io.OutputStream out) throws java.io.IOException
Write the entire contents of this Entry to the specifiedOutputStream
.- Throws:
java.io.IOException
-
size
int size()
Return the size of this Entries buffer in bytes
-
close
void close()
Close the Entry. After this point no further data will be written to theOutputStream
, and the buffer can be written to secondary memory if space is tight.
-
-