|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adobe.acrobat.file.ByteArraySource
Abstract superclass of objects that function as "handles" to potentially
changeable arrays of bytes. A ByteArraySource can, at any time, "create" a
ByteArray whose immutable contents represent the potentially very large sequence of octets
"pointed to" by this ByteArraySource. Implementers of subclasses of
ByteArraySource are required to implement the getByteArray
method, which creates a ByteArray which represents the contents associated with the
ByteArraySource at the time of the call.
ByteArraySources also provide relative simple file specification resoluation: they are capable of returning a new ByteArraySource object representing the entity located relative to this ByteArraySource by a file-spec String as described in the PDF spec.
Subclasses of ByteArraySource are usually associated with unique subclasses of
ByteArray. When the contents associated with a ByteArraySource change, the associated
ByteArray should turn "invalid" (see ByteArray.setInvalid
),
and the user of the ByteArray should take this as a signal that getByteArray
needs to be called, and all structures
dependent upon the contents of the old ByteArray ought to be updated.
For example, URLByteArraySource, which is a ByteArraySource associated with a single
URL, creates a URLByteArray which is created based on the entity-body received from a HTTP
GET request on said URL. If, in the case of byte-served connections with multiple
requests, it is discovered that the creation date or last mod date of the entity has
changed, the old URLByteArray should turn invalid and the client should ask the
URLByteArraySource for a new ByteArray. The FaultLine viewer handles this eventuality
transparently, but the onus is on the ByteArray implementer to detect invalidation in such
a way as to conform to the immutability requirements enumerated in the documentation on ByteArray
.
Constructor Summary |
ByteArraySource()
|
Method Summary | |
void |
close() For ByteArraySource s
that can have their input streams or files closed |
void |
decRefCount() |
abstract ByteArray |
getByteArray() Get the ByteArray associated with this ByteArraySource. |
abstract ByteArraySource |
getByteArraySourceRelative(java.lang.String fileSpecString)
Get the ByteArraySource relative to this ByteArraySource by the given simple file specification. |
java.lang.String |
getFullName() Get a Full Path Name for a ByteArraySource, or return null if that's not a meaningful notion. |
com.adobe.acrobat.file.ByteArraySourceSpace |
getSourceSpace()
For registered file systems, this is the ByteArraySourceSpace associated with this ByteArraySource. |
java.lang.String |
getTitle() Get the "title" of this ByteArraySource, if any. |
java.net.URL |
getURL() Get a URL that is equivalent to this ByteArraySource, or return null if that's not a meaningful notion. |
void |
incRefCount() maintain reference count for this byte array source |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Constructor Detail |
public ByteArraySource()
Method Detail |
public abstract ByteArraySource getByteArraySourceRelative(java.lang.String fileSpecString) throws java.lang.Exception
fileSpecString
- a String describing a location of another ByteArraySource,
potentially positioned relative to this ByteArraySourcepublic abstract ByteArray getByteArray() throws java.lang.Exception
public java.net.URL getURL()
public java.lang.String getFullName()
public java.lang.String getTitle()
public com.adobe.acrobat.file.ByteArraySourceSpace getSourceSpace()
public void incRefCount()
public void decRefCount() throws java.lang.Exception
public void close() throws java.lang.Exception
ByteArraySource
s that can have their input streams or files closed
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |