|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.io.FastIOHelper
public class FastIOHelper
A native-backed helper class that quickly reads primitive types into an
array from an InputStream. Read times for large arrays are
dramatically reduced by the use of this class. In other words, using this
is faster than doing byte manipulation yourself.
Note that only streams retrieved from Class.getResourceAsStream(String)
will use the fast way. The methods here will default to the slower way if
any other stream types are used.
| Method Summary | |
|---|---|
static void |
readFully(InputStream in,
boolean[] data)
Reads boolean data from the given input stream into the
specified boolean array. |
static void |
readFully(InputStream in,
boolean[] data,
int off,
int len)
Reads boolean data from the given input stream into the
specified boolean array. |
static void |
readFully(InputStream in,
char[] data)
Reads char data from the given input stream into the
specified char array. |
static void |
readFully(InputStream in,
char[] data,
int off,
int len)
Reads char data from the given input stream into the
specified char array. |
static void |
readFully(InputStream in,
int[] data)
Reads int data from the given input stream into the
specified int array. |
static void |
readFully(InputStream in,
int[] data,
int off,
int len)
Reads int data from the given input stream into the
specified int array. |
static void |
readFully(InputStream in,
long[] data)
Reads long data from the given input stream into the
specified long array. |
static void |
readFully(InputStream in,
long[] data,
int off,
int len)
Reads long data from the given input stream into the
specified long array. |
static void |
readFully(InputStream in,
short[] data)
Reads short data from the given input stream into the
specified short array. |
static void |
readFully(InputStream in,
short[] data,
int off,
int len)
Reads short data from the given input stream into the
specified short array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void readFully(InputStream in,
char[] data)
throws IOException
char data from the given input stream into the
specified char array. This will try to read data until
the array is filled. This is the same as calling
read(in, data, 0, data.length.
in - the input streamdata - read into this array
IOException - if there was an I/O error while reading.
EOFException - if the entire array could not be read.
public static void readFully(InputStream in,
char[] data,
int off,
int len)
throws IOException
char data from the given input stream into the
specified char array. This will try to read exactly
len elements.
in - the input streamdata - read into this arrayoff - offset into the arraylen - read this number of elements
IOException - if there was an I/O error while reading.
EOFException - if the specified number of elements could not be
read.
IndexOutOfBoundsException - if the parameters are out of range.
public static void readFully(InputStream in,
int[] data)
throws IOException
int data from the given input stream into the
specified int array. This will try to read data until
the array is filled. This is the same as calling
read(in, data, 0, data.length.
in - the input streamdata - read into this array
IOException - if there was an I/O error while reading.
EOFException - if the entire array could not be read.
public static void readFully(InputStream in,
int[] data,
int off,
int len)
throws IOException
int data from the given input stream into the
specified int array. This will try to read exactly
len elements.
in - the input streamdata - read into this arrayoff - offset into the arraylen - read this number of elements
IOException - if there was an I/O error while reading.
EOFException - if the specified number of elements could not be
read.
IndexOutOfBoundsException - if the parameters are out of range.
public static void readFully(InputStream in,
short[] data)
throws IOException
short data from the given input stream into the
specified short array. This will try to read data until
the array is filled. This is the same as calling
read(in, data, 0, data.length.
in - the input streamdata - read into this array
IOException - if there was an I/O error while reading.
EOFException - if the entire array could not be read.
public static void readFully(InputStream in,
short[] data,
int off,
int len)
throws IOException
short data from the given input stream into the
specified short array. This will try to read exactly
len elements.
in - the input streamdata - read into this arrayoff - offset into the arraylen - read this number of elements
IOException - if there was an I/O error while reading.
EOFException - if the specified number of elements could not be
read.
IndexOutOfBoundsException - if the parameters are out of range.
public static void readFully(InputStream in,
boolean[] data)
throws IOException
boolean data from the given input stream into the
specified boolean array. This will try to read data until
the array is filled. This is the same as calling
read(in, data, 0, data.length.
in - the input streamdata - read into this array
IOException - if there was an I/O error while reading.
EOFException - if the entire array could not be read.
public static void readFully(InputStream in,
boolean[] data,
int off,
int len)
throws IOException
boolean data from the given input stream into the
specified boolean array. This will try to read exactly
len elements.
in - the input streamdata - read into this arrayoff - offset into the arraylen - read this number of elements
IOException - if there was an I/O error while reading.
EOFException - if the specified number of elements could not be
read.
IndexOutOfBoundsException - if the parameters are out of range.
public static void readFully(InputStream in,
long[] data)
throws IOException
long data from the given input stream into the
specified long array. This will try to read data until
the array is filled. This is the same as calling
read(in, data, 0, data.length.
in - the input streamdata - read into this array
IOException - if there was an I/O error while reading.
EOFException - if the entire array could not be read.
public static void readFully(InputStream in,
long[] data,
int off,
int len)
throws IOException
long data from the given input stream into the
specified long array. This will try to read exactly
len elements.
in - the input streamdata - read into this arrayoff - offset into the arraylen - read this number of elements
IOException - if there was an I/O error while reading.
EOFException - if the specified number of elements could not be
read.
IndexOutOfBoundsException - if the parameters are out of range.
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||