public class

InputHelper

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.input.InputHelper

Class Overview

Static helper methods for IInput.

Summary

Public Constructors
InputHelper()
Public Methods
static int readBytes(IInput src, long srcOffset, byte[] dst, int dstOffset, int size)
Convenience method to read bytes from an input source.
static IInput wrapBytes(byte[] data)
Create or retrieve an input object wrapping a given byte array.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public InputHelper ()

Public Methods

public static int readBytes (IInput src, long srcOffset, byte[] dst, int dstOffset, int size)

Convenience method to read bytes from an input source.

Parameters
src source input
srcOffset offset within the source
dst destination array
dstOffset offset within the destination where bytes will be written
size 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

public static IInput wrapBytes (byte[] data)

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