Class BinIO
This class fills some gaps in the Java API. First of all, you have two buffered, easy-to-use methods to store an object to a file or load an object from a file, and two buffered, easy-to-use methods to store an object to an output stream or to load an object from an input stream.
Second, a natural operation on sequences of primitive elements is to load or
store them in binary form using the DataInput
conventions. This
method is much more flexible than storing arrays as objects, as it allows
for partial load, partial store, and makes it easy to read the
resulting files from other languages.
For each primitive type, this class provides methods that read elements
from a DataInput
, an InputStream
or from a file into an array
or a big array, or expose those elements as a type-specific iterator
.
There are also methods that let you choose a byte order and
that work with byte channels
.
Analogously, there are
methods that store the content of a (big) array (fragment) or the elements
returned by an iterator to a DataOutput
, to an OutputStream
,
to a WritableByteChannel
, or to a given file. Files
are buffered using FastBufferedInputStream
and FastBufferedOutputStream
,
or, when possible, with a byte buffer allocated with
ByteBuffer.allocateDirect(int).
Since bytes can be read from or written to any stream, additional methods
makes it possible to load bytes from and
store bytes to a stream. Such methods
use the bulk-read methods of InputStream
and OutputStream
, but they
also include a workaround for bug #6478546.
The store methods with a specified byte order are particularly useful when writing data that is intended to be mapped into memory, as using the native order enhances performances significantly.
- Since:
- 4.4
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BooleanIterable
asBooleanIterable
(File file) Wraps a file given by aFile
object into an iterable object.static BooleanIterable
asBooleanIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static BooleanIterator
asBooleanIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static BooleanIterator
asBooleanIterator
(File file) Wraps a file given by aFile
object into an iterator.static BooleanIterator
asBooleanIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static ByteIterable
asByteIterable
(File file) Wraps a file given by aFile
object into an iterable object.static ByteIterable
asByteIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static ByteIterator
asByteIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static ByteIterator
asByteIterator
(File file) Wraps a file given by aFile
object into an iterator.static ByteIterator
asByteIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static CharIterable
asCharIterable
(File file) Wraps a file given by aFile
object into an iterable object.static CharIterable
asCharIterable
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterable object.static CharIterable
asCharIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static CharIterable
asCharIterable
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterable object.static CharIterator
asCharIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static CharIterator
asCharIterator
(File file) Wraps a file given by aFile
object into an iterator.static CharIterator
asCharIterator
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterator.static CharIterator
asCharIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static CharIterator
asCharIterator
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterator.static CharIterator
asCharIterator
(ReadableByteChannel channel, ByteOrder byteOrder) Wraps the given readable channel, using the given byte order, into an iterator.static DoubleIterable
asDoubleIterable
(File file) Wraps a file given by aFile
object into an iterable object.static DoubleIterable
asDoubleIterable
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterable object.static DoubleIterable
asDoubleIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static DoubleIterable
asDoubleIterable
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterable object.static DoubleIterator
asDoubleIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static DoubleIterator
asDoubleIterator
(File file) Wraps a file given by aFile
object into an iterator.static DoubleIterator
asDoubleIterator
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterator.static DoubleIterator
asDoubleIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static DoubleIterator
asDoubleIterator
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterator.static DoubleIterator
asDoubleIterator
(ReadableByteChannel channel, ByteOrder byteOrder) Wraps the given readable channel, using the given byte order, into an iterator.static FloatIterable
asFloatIterable
(File file) Wraps a file given by aFile
object into an iterable object.static FloatIterable
asFloatIterable
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterable object.static FloatIterable
asFloatIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static FloatIterable
asFloatIterable
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterable object.static FloatIterator
asFloatIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static FloatIterator
asFloatIterator
(File file) Wraps a file given by aFile
object into an iterator.static FloatIterator
asFloatIterator
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterator.static FloatIterator
asFloatIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static FloatIterator
asFloatIterator
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterator.static FloatIterator
asFloatIterator
(ReadableByteChannel channel, ByteOrder byteOrder) Wraps the given readable channel, using the given byte order, into an iterator.static IntIterable
asIntIterable
(File file) Wraps a file given by aFile
object into an iterable object.static IntIterable
asIntIterable
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterable object.static IntIterable
asIntIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static IntIterable
asIntIterable
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterable object.static IntIterator
asIntIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static IntIterator
asIntIterator
(File file) Wraps a file given by aFile
object into an iterator.static IntIterator
asIntIterator
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterator.static IntIterator
asIntIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static IntIterator
asIntIterator
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterator.static IntIterator
asIntIterator
(ReadableByteChannel channel, ByteOrder byteOrder) Wraps the given readable channel, using the given byte order, into an iterator.static LongIterable
asLongIterable
(File file) Wraps a file given by aFile
object into an iterable object.static LongIterable
asLongIterable
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterable object.static LongIterable
asLongIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static LongIterable
asLongIterable
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterable object.static LongIterator
asLongIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static LongIterator
asLongIterator
(File file) Wraps a file given by aFile
object into an iterator.static LongIterator
asLongIterator
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterator.static LongIterator
asLongIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static LongIterator
asLongIterator
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterator.static LongIterator
asLongIterator
(ReadableByteChannel channel, ByteOrder byteOrder) Wraps the given readable channel, using the given byte order, into an iterator.static ShortIterable
asShortIterable
(File file) Wraps a file given by aFile
object into an iterable object.static ShortIterable
asShortIterable
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterable object.static ShortIterable
asShortIterable
(CharSequence filename) Wraps a file given by a filename into an iterable object.static ShortIterable
asShortIterable
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterable object.static ShortIterator
asShortIterator
(DataInput dataInput) Wraps the given data input stream into an iterator.static ShortIterator
asShortIterator
(File file) Wraps a file given by aFile
object into an iterator.static ShortIterator
asShortIterator
(File file, ByteOrder byteOrder) Wraps a file given by aFile
object, using the given byte order, into an iterator.static ShortIterator
asShortIterator
(CharSequence filename) Wraps a file given by a filename into an iterator.static ShortIterator
asShortIterator
(CharSequence filename, ByteOrder byteOrder) Wraps a file given by a filename, using the given byte order, into an iterator.static ShortIterator
asShortIterator
(ReadableByteChannel channel, ByteOrder byteOrder) Wraps the given readable channel, using the given byte order, into an iterator.static int
loadBooleans
(DataInput dataInput, boolean[] array) Loads elements from a given data input, storing them in a given array.static long
loadBooleans
(DataInput dataInput, boolean[][] array) Loads elements from a given data input, storing them in a given big array.static long
loadBooleans
(DataInput dataInput, boolean[][] array, long offset, long length) Loads elements from a given data input, storing them in a given big-array fragment.static int
loadBooleans
(DataInput dataInput, boolean[] array, int offset, int length) Loads elements from a given data input, storing them in a given array fragment.static boolean[]
loadBooleans
(File file) Loads elements from a file given by aFile
object, storing them in a new array.static int
loadBooleans
(File file, boolean[] array) Loads elements from a file given by aFile
object, storing them in a given array.static long
loadBooleans
(File file, boolean[][] array) Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadBooleans
(File file, boolean[][] array, long offset, long length) Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadBooleans
(File file, boolean[] array, int offset, int length) Loads elements from a file given by aFile
object, storing them in a given array fragment.static boolean[]
loadBooleans
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadBooleans
(CharSequence filename, boolean[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadBooleans
(CharSequence filename, boolean[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadBooleans
(CharSequence filename, boolean[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadBooleans
(CharSequence filename, boolean[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static boolean[][]
loadBooleansBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static boolean[][]
loadBooleansBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static int
Loads elements from a given data input, storing them in a given array.static long
Loads elements from a given data input, storing them in a given big array.static long
Loads elements from a given data input, storing them in a given big-array fragment.static int
Loads elements from a given data input, storing them in a given array fragment.static byte[]
Loads elements from a file given by aFile
object, storing them in a new array.static int
Loads elements from a file given by aFile
object, storing them in a given array.static long
Loads elements from a file given by aFile
object, storing them in a given big array.static long
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, storing them in a given array fragment.static int
loadBytes
(InputStream inputStream, byte[] array) Loads bytes from a given input stream, storing them in a given array.static long
loadBytes
(InputStream inputStream, byte[][] array) Loads bytes from a given readable channel, storing them in a given big array.static long
loadBytes
(InputStream inputStream, byte[][] array, long offset, long length) Loads bytes from a given readable channel, storing them in a given big-array fragment.static int
loadBytes
(InputStream inputStream, byte[] array, int offset, int length) Loads bytes from a given input stream, storing them in a given array fragment.static byte[]
loadBytes
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadBytes
(CharSequence filename, byte[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadBytes
(CharSequence filename, byte[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadBytes
(CharSequence filename, byte[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadBytes
(CharSequence filename, byte[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static int
loadBytes
(ReadableByteChannel channel, byte[] array) Loads bytes from a given readable channel, storing them in a given array.static long
loadBytes
(ReadableByteChannel channel, byte[][] array) Loads bytes from a given readable channel, storing them in a given big array.static long
loadBytes
(ReadableByteChannel channel, byte[][] array, long offset, long length) Loads bytes from a given readable channel, storing them in a given big-array fragment.static int
loadBytes
(ReadableByteChannel channel, byte[] array, int offset, int length) Loads bytes from a given readable channel, storing them in a given array fragment.static byte[][]
loadBytesBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static byte[][]
loadBytesBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static int
Loads elements from a given data input, storing them in a given array.static long
Loads elements from a given data input, storing them in a given big array.static long
Loads elements from a given data input, storing them in a given big-array fragment.static int
Loads elements from a given data input, storing them in a given array fragment.static char[]
Loads elements from a file given by aFile
object, storing them in a new array.static int
Loads elements from a file given by aFile
object, storing them in a given array.static long
Loads elements from a file given by aFile
object, storing them in a given big array.static long
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, storing them in a given array fragment.static char[]
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.static int
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.static long
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.static long
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.static char[]
loadChars
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadChars
(CharSequence filename, char[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadChars
(CharSequence filename, char[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadChars
(CharSequence filename, char[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadChars
(CharSequence filename, char[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static char[]
loadChars
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new array.static int
loadChars
(CharSequence filename, ByteOrder byteOrder, char[] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given array.static long
loadChars
(CharSequence filename, ByteOrder byteOrder, char[][] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.static long
loadChars
(CharSequence filename, ByteOrder byteOrder, char[][] array, long offset, long length) Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.static int
loadChars
(CharSequence filename, ByteOrder byteOrder, char[] array, int offset, int length) Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.static int
loadChars
(ReadableByteChannel channel, ByteOrder byteOrder, char[] array) Loads elements from a given readable channel, using the given byte order, storing them in a given array.static long
loadChars
(ReadableByteChannel channel, ByteOrder byteOrder, char[][] array) Loads elements from a given readable channel, using the given byte order, storing them in a given big array.static long
loadChars
(ReadableByteChannel channel, ByteOrder byteOrder, char[][] array, long offset, long length) Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.static int
loadChars
(ReadableByteChannel channel, ByteOrder byteOrder, char[] array, int offset, int length) Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.static char[][]
loadCharsBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static char[][]
loadCharsBig
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.static char[][]
loadCharsBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static char[][]
loadCharsBig
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.static int
loadDoubles
(DataInput dataInput, double[] array) Loads elements from a given data input, storing them in a given array.static long
loadDoubles
(DataInput dataInput, double[][] array) Loads elements from a given data input, storing them in a given big array.static long
loadDoubles
(DataInput dataInput, double[][] array, long offset, long length) Loads elements from a given data input, storing them in a given big-array fragment.static int
loadDoubles
(DataInput dataInput, double[] array, int offset, int length) Loads elements from a given data input, storing them in a given array fragment.static double[]
loadDoubles
(File file) Loads elements from a file given by aFile
object, storing them in a new array.static int
loadDoubles
(File file, double[] array) Loads elements from a file given by aFile
object, storing them in a given array.static long
loadDoubles
(File file, double[][] array) Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadDoubles
(File file, double[][] array, long offset, long length) Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadDoubles
(File file, double[] array, int offset, int length) Loads elements from a file given by aFile
object, storing them in a given array fragment.static double[]
loadDoubles
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.static int
loadDoubles
(File file, ByteOrder byteOrder, double[] array) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.static long
loadDoubles
(File file, ByteOrder byteOrder, double[][] array) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.static long
loadDoubles
(File file, ByteOrder byteOrder, double[][] array, long offset, long length) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.static int
loadDoubles
(File file, ByteOrder byteOrder, double[] array, int offset, int length) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.static double[]
loadDoubles
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadDoubles
(CharSequence filename, double[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadDoubles
(CharSequence filename, double[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadDoubles
(CharSequence filename, double[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadDoubles
(CharSequence filename, double[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static double[]
loadDoubles
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new array.static int
loadDoubles
(CharSequence filename, ByteOrder byteOrder, double[] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given array.static long
loadDoubles
(CharSequence filename, ByteOrder byteOrder, double[][] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.static long
loadDoubles
(CharSequence filename, ByteOrder byteOrder, double[][] array, long offset, long length) Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.static int
loadDoubles
(CharSequence filename, ByteOrder byteOrder, double[] array, int offset, int length) Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.static int
loadDoubles
(ReadableByteChannel channel, ByteOrder byteOrder, double[] array) Loads elements from a given readable channel, using the given byte order, storing them in a given array.static long
loadDoubles
(ReadableByteChannel channel, ByteOrder byteOrder, double[][] array) Loads elements from a given readable channel, using the given byte order, storing them in a given big array.static long
loadDoubles
(ReadableByteChannel channel, ByteOrder byteOrder, double[][] array, long offset, long length) Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.static int
loadDoubles
(ReadableByteChannel channel, ByteOrder byteOrder, double[] array, int offset, int length) Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.static double[][]
loadDoublesBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static double[][]
loadDoublesBig
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.static double[][]
loadDoublesBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static double[][]
loadDoublesBig
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.static int
loadFloats
(DataInput dataInput, float[] array) Loads elements from a given data input, storing them in a given array.static long
loadFloats
(DataInput dataInput, float[][] array) Loads elements from a given data input, storing them in a given big array.static long
loadFloats
(DataInput dataInput, float[][] array, long offset, long length) Loads elements from a given data input, storing them in a given big-array fragment.static int
loadFloats
(DataInput dataInput, float[] array, int offset, int length) Loads elements from a given data input, storing them in a given array fragment.static float[]
loadFloats
(File file) Loads elements from a file given by aFile
object, storing them in a new array.static int
loadFloats
(File file, float[] array) Loads elements from a file given by aFile
object, storing them in a given array.static long
loadFloats
(File file, float[][] array) Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadFloats
(File file, float[][] array, long offset, long length) Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadFloats
(File file, float[] array, int offset, int length) Loads elements from a file given by aFile
object, storing them in a given array fragment.static float[]
loadFloats
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.static int
loadFloats
(File file, ByteOrder byteOrder, float[] array) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.static long
loadFloats
(File file, ByteOrder byteOrder, float[][] array) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.static long
loadFloats
(File file, ByteOrder byteOrder, float[][] array, long offset, long length) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.static int
loadFloats
(File file, ByteOrder byteOrder, float[] array, int offset, int length) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.static float[]
loadFloats
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadFloats
(CharSequence filename, float[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadFloats
(CharSequence filename, float[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadFloats
(CharSequence filename, float[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadFloats
(CharSequence filename, float[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static float[]
loadFloats
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new array.static int
loadFloats
(CharSequence filename, ByteOrder byteOrder, float[] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given array.static long
loadFloats
(CharSequence filename, ByteOrder byteOrder, float[][] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.static long
loadFloats
(CharSequence filename, ByteOrder byteOrder, float[][] array, long offset, long length) Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.static int
loadFloats
(CharSequence filename, ByteOrder byteOrder, float[] array, int offset, int length) Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.static int
loadFloats
(ReadableByteChannel channel, ByteOrder byteOrder, float[] array) Loads elements from a given readable channel, using the given byte order, storing them in a given array.static long
loadFloats
(ReadableByteChannel channel, ByteOrder byteOrder, float[][] array) Loads elements from a given readable channel, using the given byte order, storing them in a given big array.static long
loadFloats
(ReadableByteChannel channel, ByteOrder byteOrder, float[][] array, long offset, long length) Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.static int
loadFloats
(ReadableByteChannel channel, ByteOrder byteOrder, float[] array, int offset, int length) Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.static float[][]
loadFloatsBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static float[][]
loadFloatsBig
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.static float[][]
loadFloatsBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static float[][]
loadFloatsBig
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.static int
Loads elements from a given data input, storing them in a given array.static long
Loads elements from a given data input, storing them in a given big array.static long
Loads elements from a given data input, storing them in a given big-array fragment.static int
Loads elements from a given data input, storing them in a given array fragment.static int[]
Loads elements from a file given by aFile
object, storing them in a new array.static int
Loads elements from a file given by aFile
object, storing them in a given array.static long
Loads elements from a file given by aFile
object, storing them in a given big array.static long
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, storing them in a given array fragment.static int[]
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.static int
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.static long
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.static long
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.static int[]
loadInts
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadInts
(CharSequence filename, int[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadInts
(CharSequence filename, int[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadInts
(CharSequence filename, int[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadInts
(CharSequence filename, int[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static int[]
loadInts
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new array.static int
loadInts
(CharSequence filename, ByteOrder byteOrder, int[] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given array.static long
loadInts
(CharSequence filename, ByteOrder byteOrder, int[][] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.static long
loadInts
(CharSequence filename, ByteOrder byteOrder, int[][] array, long offset, long length) Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.static int
loadInts
(CharSequence filename, ByteOrder byteOrder, int[] array, int offset, int length) Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.static int
loadInts
(ReadableByteChannel channel, ByteOrder byteOrder, int[] array) Loads elements from a given readable channel, using the given byte order, storing them in a given array.static long
loadInts
(ReadableByteChannel channel, ByteOrder byteOrder, int[][] array) Loads elements from a given readable channel, using the given byte order, storing them in a given big array.static long
loadInts
(ReadableByteChannel channel, ByteOrder byteOrder, int[][] array, long offset, long length) Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.static int
loadInts
(ReadableByteChannel channel, ByteOrder byteOrder, int[] array, int offset, int length) Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.static int[][]
loadIntsBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static int[][]
loadIntsBig
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.static int[][]
loadIntsBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static int[][]
loadIntsBig
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.static int
Loads elements from a given data input, storing them in a given array.static long
Loads elements from a given data input, storing them in a given big array.static long
Loads elements from a given data input, storing them in a given big-array fragment.static int
Loads elements from a given data input, storing them in a given array fragment.static long[]
Loads elements from a file given by aFile
object, storing them in a new array.static int
Loads elements from a file given by aFile
object, storing them in a given array.static long
Loads elements from a file given by aFile
object, storing them in a given big array.static long
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, storing them in a given array fragment.static long[]
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.static int
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.static long
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.static long
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.static int
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.static long[]
loadLongs
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadLongs
(CharSequence filename, long[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadLongs
(CharSequence filename, long[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadLongs
(CharSequence filename, long[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadLongs
(CharSequence filename, long[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static long[]
loadLongs
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new array.static int
loadLongs
(CharSequence filename, ByteOrder byteOrder, long[] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given array.static long
loadLongs
(CharSequence filename, ByteOrder byteOrder, long[][] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.static long
loadLongs
(CharSequence filename, ByteOrder byteOrder, long[][] array, long offset, long length) Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.static int
loadLongs
(CharSequence filename, ByteOrder byteOrder, long[] array, int offset, int length) Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.static int
loadLongs
(ReadableByteChannel channel, ByteOrder byteOrder, long[] array) Loads elements from a given readable channel, using the given byte order, storing them in a given array.static long
loadLongs
(ReadableByteChannel channel, ByteOrder byteOrder, long[][] array) Loads elements from a given readable channel, using the given byte order, storing them in a given big array.static long
loadLongs
(ReadableByteChannel channel, ByteOrder byteOrder, long[][] array, long offset, long length) Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.static int
loadLongs
(ReadableByteChannel channel, ByteOrder byteOrder, long[] array, int offset, int length) Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.static long[][]
loadLongsBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static long[][]
loadLongsBig
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.static long[][]
loadLongsBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static long[][]
loadLongsBig
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.static Object
loadObject
(File file) Loads an object from a file given by aFile
object.static Object
Loads an object from a given input stream.static Object
loadObject
(CharSequence filename) Loads an object from a file given by a filename.static int
loadShorts
(DataInput dataInput, short[] array) Loads elements from a given data input, storing them in a given array.static long
loadShorts
(DataInput dataInput, short[][] array) Loads elements from a given data input, storing them in a given big array.static long
loadShorts
(DataInput dataInput, short[][] array, long offset, long length) Loads elements from a given data input, storing them in a given big-array fragment.static int
loadShorts
(DataInput dataInput, short[] array, int offset, int length) Loads elements from a given data input, storing them in a given array fragment.static short[]
loadShorts
(File file) Loads elements from a file given by aFile
object, storing them in a new array.static int
loadShorts
(File file, short[] array) Loads elements from a file given by aFile
object, storing them in a given array.static long
loadShorts
(File file, short[][] array) Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadShorts
(File file, short[][] array, long offset, long length) Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadShorts
(File file, short[] array, int offset, int length) Loads elements from a file given by aFile
object, storing them in a given array fragment.static short[]
loadShorts
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.static int
loadShorts
(File file, ByteOrder byteOrder, short[] array) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.static long
loadShorts
(File file, ByteOrder byteOrder, short[][] array) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.static long
loadShorts
(File file, ByteOrder byteOrder, short[][] array, long offset, long length) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.static int
loadShorts
(File file, ByteOrder byteOrder, short[] array, int offset, int length) Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.static short[]
loadShorts
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new array.static int
loadShorts
(CharSequence filename, short[] array) Loads elements from a file given by a filename, storing them in a given array.static long
loadShorts
(CharSequence filename, short[][] array) Loads elements from a file given by a filename, storing them in a given big array.static long
loadShorts
(CharSequence filename, short[][] array, long offset, long length) Loads elements from a file given by a filename, storing them in a given big-array fragment.static int
loadShorts
(CharSequence filename, short[] array, int offset, int length) Loads elements from a file given by a filename, storing them in a given array fragment.static short[]
loadShorts
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new array.static int
loadShorts
(CharSequence filename, ByteOrder byteOrder, short[] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given array.static long
loadShorts
(CharSequence filename, ByteOrder byteOrder, short[][] array) Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.static long
loadShorts
(CharSequence filename, ByteOrder byteOrder, short[][] array, long offset, long length) Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.static int
loadShorts
(CharSequence filename, ByteOrder byteOrder, short[] array, int offset, int length) Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.static int
loadShorts
(ReadableByteChannel channel, ByteOrder byteOrder, short[] array) Loads elements from a given readable channel, using the given byte order, storing them in a given array.static long
loadShorts
(ReadableByteChannel channel, ByteOrder byteOrder, short[][] array) Loads elements from a given readable channel, using the given byte order, storing them in a given big array.static long
loadShorts
(ReadableByteChannel channel, ByteOrder byteOrder, short[][] array, long offset, long length) Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.static int
loadShorts
(ReadableByteChannel channel, ByteOrder byteOrder, short[] array, int offset, int length) Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.static short[][]
loadShortsBig
(File file) Loads elements from a file given by aFile
object, storing them in a new big array.static short[][]
loadShortsBig
(File file, ByteOrder byteOrder) Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.static short[][]
loadShortsBig
(CharSequence filename) Loads elements from a file given by a filename, storing them in a new big array.static short[][]
loadShortsBig
(CharSequence filename, ByteOrder byteOrder) Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.static void
storeBooleans
(boolean[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeBooleans
(boolean[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeBooleans
(boolean[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeBooleans
(boolean[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeBooleans
(boolean[][] array, File file) Stores an array to a file given by aFile
object.static void
storeBooleans
(boolean[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeBooleans
(boolean[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeBooleans
(boolean[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeBooleans
(boolean[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeBooleans
(boolean[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeBooleans
(boolean[] array, File file) Stores an array to a file given by aFile
object.static void
storeBooleans
(boolean[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeBooleans
(BooleanIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeBooleans
(BooleanIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeBooleans
(BooleanIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeBytes
(byte[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeBytes
(byte[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeBytes
(byte[][] array, long offset, long length, OutputStream outputStream) Stores a big-array fragment to a given writable channel.static void
storeBytes
(byte[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeBytes
(byte[][] array, long offset, long length, WritableByteChannel channel) Stores a big-array fragment to a given writable channel.static void
storeBytes
(byte[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeBytes
(byte[][] array, File file) Stores an array to a file given by aFile
object.static void
storeBytes
(byte[][] array, OutputStream outputStream) Stores a big array to a given writable channel.static void
storeBytes
(byte[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeBytes
(byte[][] array, WritableByteChannel channel) Stores a big array to a given writable channel.static void
storeBytes
(byte[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeBytes
(byte[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeBytes
(byte[] array, int offset, int length, OutputStream outputStream) Stores an array fragment to a given writable channel.static void
storeBytes
(byte[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeBytes
(byte[] array, int offset, int length, WritableByteChannel channel) Stores an array fragment to a given writable channel.static void
storeBytes
(byte[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeBytes
(byte[] array, File file) Stores an array to a file given by aFile
object.static void
storeBytes
(byte[] array, OutputStream outputStream) Stores an array to a given writable channel.static void
storeBytes
(byte[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeBytes
(byte[] array, WritableByteChannel channel) Stores an array to a given writable channel.static void
storeBytes
(ByteIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeBytes
(ByteIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeBytes
(ByteIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeChars
(char[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeChars
(char[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeChars
(char[][] array, long offset, long length, File file, ByteOrder byteOrder) Stores a big-array fragment to a file given by aFile
object, using the given byte order.static void
storeChars
(char[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeChars
(char[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) Stores a big-array fragment to a file given by a filename, using the given byte order.static void
storeChars
(char[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeChars
(char[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeChars
(char[][] array, File file) Stores an array to a file given by aFile
object.static void
storeChars
(char[][] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeChars
(char[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeChars
(char[][] array, CharSequence filename, ByteOrder byteOrder) Stores a big array to a file given by a filename, using the given byte order.static void
storeChars
(char[][] array, WritableByteChannel channel, ByteOrder byteOrder) Stores a big array to a given writable channel, using the given byte order.static void
storeChars
(char[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeChars
(char[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeChars
(char[] array, int offset, int length, File file, ByteOrder byteOrder) Stores an array fragment to a file given by aFile
object, using the given byte order.static void
storeChars
(char[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeChars
(char[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) Stores an array fragment to a file given by a filename, using the given byte order.static void
storeChars
(char[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeChars
(char[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeChars
(char[] array, File file) Stores an array to a file given by aFile
object.static void
storeChars
(char[] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeChars
(char[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeChars
(char[] array, CharSequence filename, ByteOrder byteOrder) Stores an array to a file given by a filename, using the given byte order.static void
storeChars
(char[] array, WritableByteChannel channel, ByteOrder byteOrder) Stores an array to a given writable channel, using the given byte order.static void
storeChars
(CharIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeChars
(CharIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeChars
(CharIterator i, File file, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.static void
storeChars
(CharIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeChars
(CharIterator i, CharSequence filename, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by a filename, using the given byte order.static void
storeChars
(CharIterator i, WritableByteChannel channel, ByteOrder byteOrder) Stores the element returned by an iterator to a given writable channel, using the given byte order.static void
storeDoubles
(double[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeDoubles
(double[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeDoubles
(double[][] array, long offset, long length, File file, ByteOrder byteOrder) Stores a big-array fragment to a file given by aFile
object, using the given byte order.static void
storeDoubles
(double[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeDoubles
(double[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) Stores a big-array fragment to a file given by a filename, using the given byte order.static void
storeDoubles
(double[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeDoubles
(double[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeDoubles
(double[][] array, File file) Stores an array to a file given by aFile
object.static void
storeDoubles
(double[][] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeDoubles
(double[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeDoubles
(double[][] array, CharSequence filename, ByteOrder byteOrder) Stores a big array to a file given by a filename, using the given byte order.static void
storeDoubles
(double[][] array, WritableByteChannel channel, ByteOrder byteOrder) Stores a big array to a given writable channel, using the given byte order.static void
storeDoubles
(double[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeDoubles
(double[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeDoubles
(double[] array, int offset, int length, File file, ByteOrder byteOrder) Stores an array fragment to a file given by aFile
object, using the given byte order.static void
storeDoubles
(double[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeDoubles
(double[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) Stores an array fragment to a file given by a filename, using the given byte order.static void
storeDoubles
(double[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeDoubles
(double[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeDoubles
(double[] array, File file) Stores an array to a file given by aFile
object.static void
storeDoubles
(double[] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeDoubles
(double[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeDoubles
(double[] array, CharSequence filename, ByteOrder byteOrder) Stores an array to a file given by a filename, using the given byte order.static void
storeDoubles
(double[] array, WritableByteChannel channel, ByteOrder byteOrder) Stores an array to a given writable channel, using the given byte order.static void
storeDoubles
(DoubleIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeDoubles
(DoubleIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeDoubles
(DoubleIterator i, File file, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.static void
storeDoubles
(DoubleIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeDoubles
(DoubleIterator i, CharSequence filename, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by a filename, using the given byte order.static void
storeDoubles
(DoubleIterator i, WritableByteChannel channel, ByteOrder byteOrder) Stores the element returned by an iterator to a given writable channel, using the given byte order.static void
storeFloats
(float[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeFloats
(float[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeFloats
(float[][] array, long offset, long length, File file, ByteOrder byteOrder) Stores a big-array fragment to a file given by aFile
object, using the given byte order.static void
storeFloats
(float[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeFloats
(float[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) Stores a big-array fragment to a file given by a filename, using the given byte order.static void
storeFloats
(float[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeFloats
(float[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeFloats
(float[][] array, File file) Stores an array to a file given by aFile
object.static void
storeFloats
(float[][] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeFloats
(float[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeFloats
(float[][] array, CharSequence filename, ByteOrder byteOrder) Stores a big array to a file given by a filename, using the given byte order.static void
storeFloats
(float[][] array, WritableByteChannel channel, ByteOrder byteOrder) Stores a big array to a given writable channel, using the given byte order.static void
storeFloats
(float[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeFloats
(float[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeFloats
(float[] array, int offset, int length, File file, ByteOrder byteOrder) Stores an array fragment to a file given by aFile
object, using the given byte order.static void
storeFloats
(float[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeFloats
(float[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) Stores an array fragment to a file given by a filename, using the given byte order.static void
storeFloats
(float[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeFloats
(float[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeFloats
(float[] array, File file) Stores an array to a file given by aFile
object.static void
storeFloats
(float[] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeFloats
(float[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeFloats
(float[] array, CharSequence filename, ByteOrder byteOrder) Stores an array to a file given by a filename, using the given byte order.static void
storeFloats
(float[] array, WritableByteChannel channel, ByteOrder byteOrder) Stores an array to a given writable channel, using the given byte order.static void
storeFloats
(FloatIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeFloats
(FloatIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeFloats
(FloatIterator i, File file, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.static void
storeFloats
(FloatIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeFloats
(FloatIterator i, CharSequence filename, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by a filename, using the given byte order.static void
storeFloats
(FloatIterator i, WritableByteChannel channel, ByteOrder byteOrder) Stores the element returned by an iterator to a given writable channel, using the given byte order.static void
storeInts
(int[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
Stores a big-array fragment to a file given by aFile
object.static void
Stores a big-array fragment to a file given by aFile
object, using the given byte order.static void
storeInts
(int[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeInts
(int[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) Stores a big-array fragment to a file given by a filename, using the given byte order.static void
storeInts
(int[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeInts
(int[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
Stores an array to a file given by aFile
object.static void
Stores an array to a file given by aFile
object, using the given byte order.static void
storeInts
(int[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeInts
(int[][] array, CharSequence filename, ByteOrder byteOrder) Stores a big array to a file given by a filename, using the given byte order.static void
storeInts
(int[][] array, WritableByteChannel channel, ByteOrder byteOrder) Stores a big array to a given writable channel, using the given byte order.static void
storeInts
(int[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
Stores an array fragment to a file given by aFile
object.static void
Stores an array fragment to a file given by aFile
object, using the given byte order.static void
storeInts
(int[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeInts
(int[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) Stores an array fragment to a file given by a filename, using the given byte order.static void
storeInts
(int[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeInts
(int[] array, DataOutput dataOutput) Stores an array to a given data output.static void
Stores an array to a file given by aFile
object.static void
Stores an array to a file given by aFile
object, using the given byte order.static void
storeInts
(int[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeInts
(int[] array, CharSequence filename, ByteOrder byteOrder) Stores an array to a file given by a filename, using the given byte order.static void
storeInts
(int[] array, WritableByteChannel channel, ByteOrder byteOrder) Stores an array to a given writable channel, using the given byte order.static void
storeInts
(IntIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeInts
(IntIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeInts
(IntIterator i, File file, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.static void
storeInts
(IntIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeInts
(IntIterator i, CharSequence filename, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by a filename, using the given byte order.static void
storeInts
(IntIterator i, WritableByteChannel channel, ByteOrder byteOrder) Stores the element returned by an iterator to a given writable channel, using the given byte order.static void
storeLongs
(long[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeLongs
(long[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeLongs
(long[][] array, long offset, long length, File file, ByteOrder byteOrder) Stores a big-array fragment to a file given by aFile
object, using the given byte order.static void
storeLongs
(long[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeLongs
(long[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) Stores a big-array fragment to a file given by a filename, using the given byte order.static void
storeLongs
(long[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeLongs
(long[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeLongs
(long[][] array, File file) Stores an array to a file given by aFile
object.static void
storeLongs
(long[][] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeLongs
(long[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeLongs
(long[][] array, CharSequence filename, ByteOrder byteOrder) Stores a big array to a file given by a filename, using the given byte order.static void
storeLongs
(long[][] array, WritableByteChannel channel, ByteOrder byteOrder) Stores a big array to a given writable channel, using the given byte order.static void
storeLongs
(long[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeLongs
(long[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeLongs
(long[] array, int offset, int length, File file, ByteOrder byteOrder) Stores an array fragment to a file given by aFile
object, using the given byte order.static void
storeLongs
(long[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeLongs
(long[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) Stores an array fragment to a file given by a filename, using the given byte order.static void
storeLongs
(long[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeLongs
(long[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeLongs
(long[] array, File file) Stores an array to a file given by aFile
object.static void
storeLongs
(long[] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeLongs
(long[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeLongs
(long[] array, CharSequence filename, ByteOrder byteOrder) Stores an array to a file given by a filename, using the given byte order.static void
storeLongs
(long[] array, WritableByteChannel channel, ByteOrder byteOrder) Stores an array to a given writable channel, using the given byte order.static void
storeLongs
(LongIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeLongs
(LongIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeLongs
(LongIterator i, File file, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.static void
storeLongs
(LongIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeLongs
(LongIterator i, CharSequence filename, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by a filename, using the given byte order.static void
storeLongs
(LongIterator i, WritableByteChannel channel, ByteOrder byteOrder) Stores the element returned by an iterator to a given writable channel, using the given byte order.static void
storeObject
(Object o, File file) Stores an object in a file given by aFile
object.static void
storeObject
(Object o, OutputStream s) Stores an object in a given output stream.static void
storeObject
(Object o, CharSequence filename) Stores an object in a file given by a filename.static void
storeShorts
(short[][] array, long offset, long length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeShorts
(short[][] array, long offset, long length, File file) Stores a big-array fragment to a file given by aFile
object.static void
storeShorts
(short[][] array, long offset, long length, File file, ByteOrder byteOrder) Stores a big-array fragment to a file given by aFile
object, using the given byte order.static void
storeShorts
(short[][] array, long offset, long length, CharSequence filename) Stores a big-array fragment to a file given by a filename.static void
storeShorts
(short[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) Stores a big-array fragment to a file given by a filename, using the given byte order.static void
storeShorts
(short[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeShorts
(short[][] array, DataOutput dataOutput) Stores a big array to a given data output.static void
storeShorts
(short[][] array, File file) Stores an array to a file given by aFile
object.static void
storeShorts
(short[][] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeShorts
(short[][] array, CharSequence filename) Stores a big array to a file given by a filename.static void
storeShorts
(short[][] array, CharSequence filename, ByteOrder byteOrder) Stores a big array to a file given by a filename, using the given byte order.static void
storeShorts
(short[][] array, WritableByteChannel channel, ByteOrder byteOrder) Stores a big array to a given writable channel, using the given byte order.static void
storeShorts
(short[] array, int offset, int length, DataOutput dataOutput) Stores an array fragment to a given data output.static void
storeShorts
(short[] array, int offset, int length, File file) Stores an array fragment to a file given by aFile
object.static void
storeShorts
(short[] array, int offset, int length, File file, ByteOrder byteOrder) Stores an array fragment to a file given by aFile
object, using the given byte order.static void
storeShorts
(short[] array, int offset, int length, CharSequence filename) Stores an array fragment to a file given by a filename.static void
storeShorts
(short[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) Stores an array fragment to a file given by a filename, using the given byte order.static void
storeShorts
(short[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) Stores an array fragment to a given writable channel, using the given byte order.static void
storeShorts
(short[] array, DataOutput dataOutput) Stores an array to a given data output.static void
storeShorts
(short[] array, File file) Stores an array to a file given by aFile
object.static void
storeShorts
(short[] array, File file, ByteOrder byteOrder) Stores an array to a file given by aFile
object, using the given byte order.static void
storeShorts
(short[] array, CharSequence filename) Stores an array to a file given by a filename.static void
storeShorts
(short[] array, CharSequence filename, ByteOrder byteOrder) Stores an array to a file given by a filename, using the given byte order.static void
storeShorts
(short[] array, WritableByteChannel channel, ByteOrder byteOrder) Stores an array to a given writable channel, using the given byte order.static void
storeShorts
(ShortIterator i, DataOutput dataOutput) Stores the element returned by an iterator to a given data output.static void
storeShorts
(ShortIterator i, File file) Stores the element returned by an iterator to a file given by aFile
object.static void
storeShorts
(ShortIterator i, File file, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.static void
storeShorts
(ShortIterator i, CharSequence filename) Stores the element returned by an iterator to a file given by a filename.static void
storeShorts
(ShortIterator i, CharSequence filename, ByteOrder byteOrder) Stores the element returned by an iterator to a file given by a filename, using the given byte order.static void
storeShorts
(ShortIterator i, WritableByteChannel channel, ByteOrder byteOrder) Stores the element returned by an iterator to a given writable channel, using the given byte order.
-
Field Details
-
BUFFER_SIZE
public static int BUFFER_SIZEThe size used withByteBuffer.allocateDirect(int)
.
-
-
Method Details
-
storeObject
Stores an object in a file given by aFile
object.- Parameters:
o
- an object.file
- a file.- Throws:
IOException
- See Also:
-
storeObject
Stores an object in a file given by a filename.- Parameters:
o
- an object.filename
- a filename.- Throws:
IOException
- See Also:
-
loadObject
Loads an object from a file given by aFile
object.- Parameters:
file
- a file.- Returns:
- the object stored under the given file.
- Throws:
IOException
ClassNotFoundException
- See Also:
-
loadObject
Loads an object from a file given by a filename.- Parameters:
filename
- a filename.- Returns:
- the object stored under the given filename.
- Throws:
IOException
ClassNotFoundException
- See Also:
-
storeObject
Stores an object in a given output stream.This method buffers
s
, and flushes all wrappers after callingwriteObject()
, but does not closes
.- Parameters:
o
- an object.s
- an output stream.- Throws:
IOException
- See Also:
-
loadObject
Loads an object from a given input stream.Warning: this method buffers the input stream. As a consequence, subsequent reads from the same stream may not give the desired results, as bytes may have been read by the internal buffer, but not used by
readObject()
. This is a feature, as this method is targeted at one-shot reading from streams, e.g., reading exactly one object fromSystem.in
.- Parameters:
s
- an input stream.- Returns:
- the object read from the given input stream.
- Throws:
IOException
ClassNotFoundException
- See Also:
-
loadBooleans
public static int loadBooleans(DataInput dataInput, boolean[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadBooleans
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadBooleans
public static int loadBooleans(File file, boolean[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBooleans
public static int loadBooleans(CharSequence filename, boolean[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBooleans
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeBooleans
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, File file) throws IOException Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeBooleans
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeBooleans
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadBooleans
public static long loadBooleans(DataInput dataInput, boolean[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadBooleans
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadBooleans
public static long loadBooleans(File file, boolean[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBooleans
public static long loadBooleans(CharSequence filename, boolean[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBooleans
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBooleansBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadBooleansBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeBooleans
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeBooleans
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeBooleans
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeBooleans
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeBooleans
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeBooleans
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asBooleanIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asBooleanIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asBooleanIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asBooleanIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asBooleanIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadBytes
public static int loadBytes(InputStream inputStream, byte[] array, int offset, int length) throws IOException Loads bytes from a given input stream, storing them in a given array fragment.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesInputStream
's bulk-read methods.- Parameters:
inputStream
- an input stream.array
- an array which will be filled with data frominputStream
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
inputStream
(it might be less thanlength
ifinputStream
ends). - Throws:
IOException
-
loadBytes
Loads bytes from a given input stream, storing them in a given array.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[])
as it usesInputStream
's bulk-read methods.- Parameters:
inputStream
- an input stream.array
- an array which will be filled with data frominputStream
.- Returns:
- the number of elements actually read from
inputStream
(it might be less than the array length ifinputStream
ends). - Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, OutputStream outputStream) throws IOException Stores an array fragment to a given writable channel.Note that this method is going to be significantly faster than
storeBytes(byte[],int,int,DataOutput)
as it usesOutputStream
's bulk-write methods.- Parameters:
array
- an array whose elements will be written tooutputStream
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.outputStream
- an output stream.- Throws:
IOException
-
storeBytes
Stores an array to a given writable channel.Note that this method is going to be significantly faster than
storeBytes(byte[],DataOutput)
as it usesOutputStream
's bulk-write methods.- Parameters:
array
- an array whose elements will be written tooutputStream
.outputStream
- an output stream.- Throws:
IOException
-
loadBytes
public static long loadBytes(InputStream inputStream, byte[][] array, long offset, long length) throws IOException Loads bytes from a given readable channel, storing them in a given big-array fragment.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[][],long,long)
as it usesInputStream
's bulk-read methods.- Parameters:
inputStream
- an input stream.array
- a big array which will be filled with data frominputStream
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
inputStream
(it might be less thanlength
ifinputStream
ends). - Throws:
IOException
-
loadBytes
Loads bytes from a given readable channel, storing them in a given big array.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[][])
as it usesInputStream
's bulk-read methods.- Parameters:
inputStream
- an input stream.array
- a big array which will be filled with data frominputStream
.- Returns:
- the number of elements actually read from
inputStream
(it might be less than the array length ifinputStream
ends). - Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, OutputStream outputStream) throws IOException Stores a big-array fragment to a given writable channel.Note that this method is going to be significantly faster than
storeBytes(byte[][],long,long,DataOutput)
as it usesOutputStream
's bulk-write methods.- Parameters:
array
- a big array whose elements will be written tooutputStream
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.outputStream
- an output stream.- Throws:
IOException
-
storeBytes
Stores a big array to a given writable channel.Note that this method is going to be significantly faster than
storeBytes(byte[][],DataOutput)
as it usesOutputStream
's bulk-write methods.- Parameters:
array
- a big array whose elements will be written tooutputStream
.outputStream
- an output stream.- Throws:
IOException
-
loadBytes
public static int loadBytes(ReadableByteChannel channel, byte[] array, int offset, int length) throws IOException Loads bytes from a given readable channel, storing them in a given array fragment.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesReadableByteChannel
's bulk-read methods.- Parameters:
channel
- a readable channel.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadBytes
Loads bytes from a given readable channel, storing them in a given array.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesReadableByteChannel
's bulk-read methods.- Parameters:
channel
- a readable channel.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, WritableByteChannel channel) throws IOException Stores an array fragment to a given writable channel.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesWritableByteChannel
's bulk-write methods.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.- Throws:
IOException
-
storeBytes
Stores an array to a given writable channel.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesWritableByteChannel
's bulk-write methods.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.- Throws:
IOException
-
loadBytes
public static long loadBytes(ReadableByteChannel channel, byte[][] array, long offset, long length) throws IOException Loads bytes from a given readable channel, storing them in a given big-array fragment.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesReadableByteChannel
's bulk-read methods.- Parameters:
channel
- a readable channel.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadBytes
Loads bytes from a given readable channel, storing them in a given big array.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesReadableByteChannel
's bulk-read methods.- Parameters:
channel
- a readable channel.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, WritableByteChannel channel) throws IOException Stores a big-array fragment to a given writable channel.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesWritableByteChannel
's bulk-write methods.- Parameters:
array
- a big array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.- Throws:
IOException
-
storeBytes
Stores a big array to a given writable channel.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[],int,int)
as it usesWritableByteChannel
's bulk-write methods.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.- Throws:
IOException
-
loadBytes
public static int loadBytes(DataInput dataInput, byte[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadBytes
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadBytes
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBytes
public static int loadBytes(CharSequence filename, byte[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBytes
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBytes
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBytes
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadBytes
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeBytes
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeBytes
Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeBytes
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeBytes
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadBytes
public static long loadBytes(DataInput dataInput, byte[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadBytes
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadBytes
public static long loadBytes(File file, byte[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBytes
public static long loadBytes(CharSequence filename, byte[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadBytes
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBytes
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBytesBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadBytesBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeBytes
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeBytes
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeBytes
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeBytes
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeBytes
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeBytes
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asByteIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asByteIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asByteIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asByteIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asByteIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadChars
public static int loadChars(ReadableByteChannel channel, ByteOrder byteOrder, char[] array, int offset, int length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadChars
public static int loadChars(ReadableByteChannel channel, ByteOrder byteOrder, char[] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadChars
public static int loadChars(File file, ByteOrder byteOrder, char[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
public static int loadChars(CharSequence filename, ByteOrder byteOrder, char[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
public static int loadChars(CharSequence filename, ByteOrder byteOrder, char[] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadChars
Loads elements from a file given by a filename, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, File file, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeChars
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
loadChars
public static long loadChars(ReadableByteChannel channel, ByteOrder byteOrder, char[][] array, long offset, long length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadChars
public static long loadChars(ReadableByteChannel channel, ByteOrder byteOrder, char[][] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadChars
public static long loadChars(File file, ByteOrder byteOrder, char[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
public static long loadChars(CharSequence filename, ByteOrder byteOrder, char[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
public static long loadChars(CharSequence filename, ByteOrder byteOrder, char[][] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadCharsBig
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadCharsBig
Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores a big array to a given writable channel, using the given byte order.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, File file, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeChars
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big array to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeChars
public static void storeChars(CharIterator i, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a given writable channel, using the given byte order.- Parameters:
i
- an iterator whose output will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeChars
Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeChars
public static void storeChars(CharIterator i, CharSequence filename, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by a filename, using the given byte order.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
asCharIterator
Wraps the given readable channel, using the given byte order, into an iterator.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.
-
asCharIterator
Wraps a file given by aFile
object, using the given byte order, into an iterator.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asCharIterator
public static CharIterator asCharIterator(CharSequence filename, ByteOrder byteOrder) throws IOException Wraps a file given by a filename, using the given byte order, into an iterator.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asCharIterable
Wraps a file given by aFile
object, using the given byte order, into an iterable object.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asCharIterable
Wraps a file given by a filename, using the given byte order, into an iterable object.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadChars
public static int loadChars(DataInput dataInput, char[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadChars
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
public static int loadChars(CharSequence filename, char[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadChars
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeChars
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeChars
Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeChars
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeChars
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadChars
public static long loadChars(DataInput dataInput, char[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadChars
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadChars
public static long loadChars(File file, char[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
public static long loadChars(CharSequence filename, char[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadCharsBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadCharsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeChars
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeChars
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeChars
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeChars
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeChars
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeChars
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asCharIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asCharIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asCharIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asCharIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asCharIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadShorts
public static int loadShorts(ReadableByteChannel channel, ByteOrder byteOrder, short[] array, int offset, int length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadShorts
public static int loadShorts(ReadableByteChannel channel, ByteOrder byteOrder, short[] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadShorts
public static int loadShorts(File file, ByteOrder byteOrder, short[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
public static int loadShorts(CharSequence filename, ByteOrder byteOrder, short[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
public static int loadShorts(CharSequence filename, ByteOrder byteOrder, short[] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a filename, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, File file, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeShorts
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
loadShorts
public static long loadShorts(ReadableByteChannel channel, ByteOrder byteOrder, short[][] array, long offset, long length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadShorts
public static long loadShorts(ReadableByteChannel channel, ByteOrder byteOrder, short[][] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadShorts
public static long loadShorts(File file, ByteOrder byteOrder, short[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
public static long loadShorts(CharSequence filename, ByteOrder byteOrder, short[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
public static long loadShorts(CharSequence filename, ByteOrder byteOrder, short[][] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShortsBig
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadShortsBig
public static short[][] loadShortsBig(CharSequence filename, ByteOrder byteOrder) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores a big array to a given writable channel, using the given byte order.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, File file, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeShorts
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big array to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeShorts
public static void storeShorts(ShortIterator i, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a given writable channel, using the given byte order.- Parameters:
i
- an iterator whose output will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeShorts
Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeShorts
public static void storeShorts(ShortIterator i, CharSequence filename, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by a filename, using the given byte order.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
asShortIterator
Wraps the given readable channel, using the given byte order, into an iterator.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.
-
asShortIterator
Wraps a file given by aFile
object, using the given byte order, into an iterator.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asShortIterator
public static ShortIterator asShortIterator(CharSequence filename, ByteOrder byteOrder) throws IOException Wraps a file given by a filename, using the given byte order, into an iterator.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asShortIterable
Wraps a file given by aFile
object, using the given byte order, into an iterable object.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asShortIterable
Wraps a file given by a filename, using the given byte order, into an iterable object.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadShorts
public static int loadShorts(DataInput dataInput, short[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadShorts
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
public static int loadShorts(CharSequence filename, short[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeShorts
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeShorts
Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeShorts
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeShorts
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadShorts
public static long loadShorts(DataInput dataInput, short[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadShorts
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadShorts
public static long loadShorts(File file, short[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
public static long loadShorts(CharSequence filename, short[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShortsBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadShortsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeShorts
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeShorts
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeShorts
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeShorts
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeShorts
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeShorts
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asShortIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asShortIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asShortIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asShortIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asShortIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadInts
public static int loadInts(ReadableByteChannel channel, ByteOrder byteOrder, int[] array, int offset, int length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadInts
public static int loadInts(ReadableByteChannel channel, ByteOrder byteOrder, int[] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadInts
public static int loadInts(File file, ByteOrder byteOrder, int[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
public static int loadInts(CharSequence filename, ByteOrder byteOrder, int[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
public static int loadInts(CharSequence filename, ByteOrder byteOrder, int[] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadInts
Loads elements from a file given by a filename, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, File file, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeInts
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
loadInts
public static long loadInts(ReadableByteChannel channel, ByteOrder byteOrder, int[][] array, long offset, long length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadInts
public static long loadInts(ReadableByteChannel channel, ByteOrder byteOrder, int[][] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadInts
public static long loadInts(File file, ByteOrder byteOrder, int[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
public static long loadInts(CharSequence filename, ByteOrder byteOrder, int[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
public static long loadInts(CharSequence filename, ByteOrder byteOrder, int[][] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadIntsBig
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadIntsBig
Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores a big array to a given writable channel, using the given byte order.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, File file, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeInts
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big array to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeInts
public static void storeInts(IntIterator i, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a given writable channel, using the given byte order.- Parameters:
i
- an iterator whose output will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeInts
Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeInts
public static void storeInts(IntIterator i, CharSequence filename, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by a filename, using the given byte order.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
asIntIterator
Wraps the given readable channel, using the given byte order, into an iterator.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.
-
asIntIterator
Wraps a file given by aFile
object, using the given byte order, into an iterator.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asIntIterator
public static IntIterator asIntIterator(CharSequence filename, ByteOrder byteOrder) throws IOException Wraps a file given by a filename, using the given byte order, into an iterator.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asIntIterable
Wraps a file given by aFile
object, using the given byte order, into an iterable object.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asIntIterable
Wraps a file given by a filename, using the given byte order, into an iterable object.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadInts
public static int loadInts(DataInput dataInput, int[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadInts
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
public static int loadInts(CharSequence filename, int[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadInts
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeInts
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeInts
Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeInts
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeInts
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadInts
public static long loadInts(DataInput dataInput, int[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadInts
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
public static long loadInts(CharSequence filename, int[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadIntsBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadIntsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeInts
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeInts
Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeInts
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeInts
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeInts
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeInts
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeInts
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asIntIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asIntIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asIntIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asIntIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asIntIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadFloats
public static int loadFloats(ReadableByteChannel channel, ByteOrder byteOrder, float[] array, int offset, int length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadFloats
public static int loadFloats(ReadableByteChannel channel, ByteOrder byteOrder, float[] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadFloats
public static int loadFloats(File file, ByteOrder byteOrder, float[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
public static int loadFloats(CharSequence filename, ByteOrder byteOrder, float[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
public static int loadFloats(CharSequence filename, ByteOrder byteOrder, float[] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a filename, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, File file, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeFloats
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
loadFloats
public static long loadFloats(ReadableByteChannel channel, ByteOrder byteOrder, float[][] array, long offset, long length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadFloats
public static long loadFloats(ReadableByteChannel channel, ByteOrder byteOrder, float[][] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadFloats
public static long loadFloats(File file, ByteOrder byteOrder, float[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
public static long loadFloats(CharSequence filename, ByteOrder byteOrder, float[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
public static long loadFloats(CharSequence filename, ByteOrder byteOrder, float[][] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloatsBig
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadFloatsBig
public static float[][] loadFloatsBig(CharSequence filename, ByteOrder byteOrder) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores a big array to a given writable channel, using the given byte order.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, File file, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeFloats
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big array to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeFloats
public static void storeFloats(FloatIterator i, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a given writable channel, using the given byte order.- Parameters:
i
- an iterator whose output will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeFloats
Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeFloats
public static void storeFloats(FloatIterator i, CharSequence filename, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by a filename, using the given byte order.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
asFloatIterator
Wraps the given readable channel, using the given byte order, into an iterator.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.
-
asFloatIterator
Wraps a file given by aFile
object, using the given byte order, into an iterator.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asFloatIterator
public static FloatIterator asFloatIterator(CharSequence filename, ByteOrder byteOrder) throws IOException Wraps a file given by a filename, using the given byte order, into an iterator.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asFloatIterable
Wraps a file given by aFile
object, using the given byte order, into an iterable object.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asFloatIterable
Wraps a file given by a filename, using the given byte order, into an iterable object.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadFloats
public static int loadFloats(DataInput dataInput, float[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadFloats
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
public static int loadFloats(CharSequence filename, float[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeFloats
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeFloats
Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeFloats
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeFloats
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadFloats
public static long loadFloats(DataInput dataInput, float[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadFloats
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadFloats
public static long loadFloats(File file, float[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
public static long loadFloats(CharSequence filename, float[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloatsBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadFloatsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeFloats
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeFloats
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeFloats
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeFloats
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeFloats
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeFloats
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asFloatIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asFloatIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asFloatIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asFloatIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asFloatIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadLongs
public static int loadLongs(ReadableByteChannel channel, ByteOrder byteOrder, long[] array, int offset, int length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadLongs
public static int loadLongs(ReadableByteChannel channel, ByteOrder byteOrder, long[] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadLongs
public static int loadLongs(File file, ByteOrder byteOrder, long[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
public static int loadLongs(CharSequence filename, ByteOrder byteOrder, long[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
public static int loadLongs(CharSequence filename, ByteOrder byteOrder, long[] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a filename, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, File file, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeLongs
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
loadLongs
public static long loadLongs(ReadableByteChannel channel, ByteOrder byteOrder, long[][] array, long offset, long length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadLongs
public static long loadLongs(ReadableByteChannel channel, ByteOrder byteOrder, long[][] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadLongs
public static long loadLongs(File file, ByteOrder byteOrder, long[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
public static long loadLongs(CharSequence filename, ByteOrder byteOrder, long[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
public static long loadLongs(CharSequence filename, ByteOrder byteOrder, long[][] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongsBig
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadLongsBig
Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores a big array to a given writable channel, using the given byte order.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, File file, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeLongs
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big array to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeLongs
public static void storeLongs(LongIterator i, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a given writable channel, using the given byte order.- Parameters:
i
- an iterator whose output will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeLongs
Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeLongs
public static void storeLongs(LongIterator i, CharSequence filename, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by a filename, using the given byte order.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
asLongIterator
Wraps the given readable channel, using the given byte order, into an iterator.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.
-
asLongIterator
Wraps a file given by aFile
object, using the given byte order, into an iterator.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asLongIterator
public static LongIterator asLongIterator(CharSequence filename, ByteOrder byteOrder) throws IOException Wraps a file given by a filename, using the given byte order, into an iterator.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asLongIterable
Wraps a file given by aFile
object, using the given byte order, into an iterable object.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asLongIterable
Wraps a file given by a filename, using the given byte order, into an iterable object.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadLongs
public static int loadLongs(DataInput dataInput, long[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadLongs
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
public static int loadLongs(CharSequence filename, long[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeLongs
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeLongs
Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeLongs
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeLongs
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadLongs
public static long loadLongs(DataInput dataInput, long[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadLongs
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadLongs
public static long loadLongs(File file, long[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
public static long loadLongs(CharSequence filename, long[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongsBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadLongsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeLongs
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeLongs
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeLongs
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeLongs
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeLongs
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeLongs
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asLongIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asLongIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asLongIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asLongIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asLongIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadDoubles
public static int loadDoubles(ReadableByteChannel channel, ByteOrder byteOrder, double[] array, int offset, int length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadDoubles
public static int loadDoubles(ReadableByteChannel channel, ByteOrder byteOrder, double[] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- an array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadDoubles
public static int loadDoubles(File file, ByteOrder byteOrder, double[] array, int offset, int length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
public static int loadDoubles(CharSequence filename, ByteOrder byteOrder, double[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
public static int loadDoubles(CharSequence filename, ByteOrder byteOrder, double[] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a filename, using the given byte order, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, File file, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores an array to a file given by a filename, using the given byte order.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
loadDoubles
public static long loadDoubles(ReadableByteChannel channel, ByteOrder byteOrder, double[][] array, long offset, long length) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big-array fragment.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
channel
(it might be less thanlength
ifchannel
ends). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(ReadableByteChannel channel, ByteOrder byteOrder, double[][] array) throws IOException Loads elements from a given readable channel, using the given byte order, storing them in a given big array.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.array
- a big array which will be filled with data fromchannel
.- Returns:
- the number of elements actually read from
channel
(it might be less than the array length ifchannel
ends). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(File file, ByteOrder byteOrder, double[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big-array fragment.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(CharSequence filename, ByteOrder byteOrder, double[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big-array fragment.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, using the given byte order, storing them in a given big array.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
public static long loadDoubles(CharSequence filename, ByteOrder byteOrder, double[][] array) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a given big array.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoublesBig
Loads elements from a file given by aFile
object, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadDoublesBig
public static double[][] loadDoublesBig(CharSequence filename, ByteOrder byteOrder) throws IOException Loads elements from a file given by a filename, using the given byte order, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores an array fragment to a given writable channel, using the given byte order.- Parameters:
array
- an array whose elements will be written tochannel
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores a big array to a given writable channel, using the given byte order.- Parameters:
array
- a big array whose elements will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, File file, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by aFile
object, using the given byte order.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big-array fragment to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, File file, ByteOrder byteOrder) throws IOException Stores an array to a file given by aFile
object, using the given byte order.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, CharSequence filename, ByteOrder byteOrder) throws IOException Stores a big array to a file given by a filename, using the given byte order.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(DoubleIterator i, WritableByteChannel channel, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a given writable channel, using the given byte order.- Parameters:
i
- an iterator whose output will be written tochannel
.channel
- a writable channel.byteOrder
- the byte order to be used to store data inchannel
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(DoubleIterator i, File file, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by aFile
object, using the given byte order.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.byteOrder
- the byte order to be used to store data infile
.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(DoubleIterator i, CharSequence filename, ByteOrder byteOrder) throws IOException Stores the element returned by an iterator to a file given by a filename, using the given byte order.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.byteOrder
- the byte order to be used to store data in the filefilename
.- Throws:
IOException
-
asDoubleIterator
Wraps the given readable channel, using the given byte order, into an iterator.- Parameters:
channel
- a readable channel.byteOrder
- the byte order of the data fromchannel
.
-
asDoubleIterator
Wraps a file given by aFile
object, using the given byte order, into an iterator.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asDoubleIterator
public static DoubleIterator asDoubleIterator(CharSequence filename, ByteOrder byteOrder) throws IOException Wraps a file given by a filename, using the given byte order, into an iterator.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asDoubleIterable
Wraps a file given by aFile
object, using the given byte order, into an iterable object.- Parameters:
file
- a file.byteOrder
- the byte order of the data stored infile
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asDoubleIterable
Wraps a file given by a filename, using the given byte order, into an iterable object.- Parameters:
filename
- a filename.byteOrder
- the byte order of the data stored in the filefilename
.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
loadDoubles
public static int loadDoubles(DataInput dataInput, double[] array, int offset, int length) throws IOException Loads elements from a given data input, storing them in a given array fragment.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadDoubles
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput
- a data input.array
- an array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, storing them in a given array fragment.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
public static int loadDoubles(CharSequence filename, double[] array, int offset, int length) throws IOException Loads elements from a file given by a filename, storing them in a given array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, storing them in a given array.- Parameters:
file
- a file.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a filename, storing them in a given array.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeDoubles
Stores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, File file) throws IOException Stores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, CharSequence filename) throws IOException Stores an array fragment to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by a filename.- Parameters:
array
- an array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
loadDoubles
public static long loadDoubles(DataInput dataInput, double[][] array, long offset, long length) throws IOException Loads elements from a given data input, storing them in a given big-array fragment.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
IOException
-
loadDoubles
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput
- a data input.array
- a big array which will be filled with data fromdataInput
.- Returns:
- the number of elements actually read from
dataInput
(it might be less than the array length ifdataInput
ends). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(File file, double[][] array, long offset, long length) throws IOException Loads elements from a file given by aFile
object, storing them in a given big-array fragment.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(CharSequence filename, double[][] array, long offset, long length) throws IOException Loads elements from a file given by a filename, storing them in a given big-array fragment.- Parameters:
filename
- a filename.array
- an array which will be filled with data from the specified file.offset
- the index of the first element ofarray
to be filled.length
- the number of elements ofarray
to be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
length
if the file is too short). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFile
object, storing them in a given big array.- Parameters:
file
- a file.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a filename, storing them in a given big array.- Parameters:
filename
- a filename.array
- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoublesBig
Loads elements from a file given by aFile
object, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file
- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadDoublesBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename
- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, DataOutput dataOutput) throws IOException Stores an array fragment to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.dataOutput
- a data output.- Throws:
IOException
-
storeDoubles
Stores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, File file) throws IOException Stores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofile
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, CharSequence filename) throws IOException Stores a big-array fragment to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofile
.file
- a file.- Throws:
IOException
-
storeDoubles
Stores a big array to a file given by a filename.- Parameters:
array
- a big array whose elements will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
storeDoubles
Stores the element returned by an iterator to a given data output.- Parameters:
i
- an iterator whose output will be written todataOutput
.dataOutput
- a filename.- Throws:
IOException
-
storeDoubles
Stores the element returned by an iterator to a file given by aFile
object.- Parameters:
i
- an iterator whose output will be written tofile
.file
- a file.- Throws:
IOException
-
storeDoubles
Stores the element returned by an iterator to a file given by a filename.- Parameters:
i
- an iterator whose output will be written to the filefilename
.filename
- a filename.- Throws:
IOException
-
asDoubleIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput
- a data input.
-
asDoubleIterator
Wraps a file given by aFile
object into an iterator.- Parameters:
file
- a file.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asDoubleIterator
Wraps a file given by a filename into an iterator.- Parameters:
filename
- a filename.- Throws:
IOException
- Implementation Notes:
- This method opens a
FileChannel
that will not be closed until it is garbage collected.
-
asDoubleIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-
asDoubleIterable
Wraps a file given by a filename into an iterable object.- Parameters:
filename
- a filename.- Implementation Notes:
- Each iterator returned by this class opens a
FileChannel
that will not be closed until it is garbage collected.
-