Package com.pnfsoftware.jeb.core.input
Class InputHelper
java.lang.Object
com.pnfsoftware.jeb.core.input.InputHelper
Static helper methods for
IInput
.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InputHelper
public InputHelper()
-
-
Method Details
-
wrapBytes
Create or retrieve an input object wrapping a given byte array.- Parameters:
data
- the data array to be wrapped, cannot be null- Returns:
- a new or existing input object wrapping data
-
readBytes
public static int readBytes(IInput src, long srcOffset, byte[] dst, int dstOffset, int size) throws IOException Convenience method to read bytes from an input source.- Parameters:
src
- source inputsrcOffset
- offset within the sourcedst
- destination arraydstOffset
- offset within the destination where bytes will be writtensize
- count of bytes to read from the source and write to the destination- Returns:
- the number of bytes that were actually read, -1 if there is no more bytes to be read
- Throws:
IOException
- on IO error
-