Package com.pnfsoftware.jeb.core.input
Interface IDataProvider
Definition of a bytes provider, whose key can be augmented by an integer id (version code).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getDataBytes
(String key, int id) default int
getDataBytes
(String name, int id, byte[] buffer, int bufferOffset, int wantedSize) Optional method.long
getDataSize
(String key, int id) default InputStream
openDataStream
(String name, int id) Optional method.
-
Field Details
-
NOT_IMPLEMENTED
static final int NOT_IMPLEMENTED- See Also:
-
-
Method Details
-
getDataSize
- Parameters:
key
- entry nameid
- optional entry id- Returns:
- the size of the entry (may be more than 4Gb)
-
getDataBytes
- Parameters:
key
- entry nameid
- optional entry id- Returns:
- the entire data for the entry (at most 2Gb)
-
getDataBytes
Optional method. The default implementation returnsNOT_IMPLEMENTED
.- Parameters:
key
- entry nameid
- optional entry idbuffer
- destination bufferbufferOffset
- offset where the data should be written to in the bufferwantedSize
- requested size to read- Returns:
- the actual read size (may be less than requested); a negative number on error
-
openDataStream
Optional method. The default implementation returns null.- Parameters:
key
- entry nameid
- optional entry id- Returns:
- an input stream (the caller must close the stream when done)
- Throws:
IOException
-