Class BinIO
public class BinIO
extends java.lang.Object
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
or from a filename into an array. Analogously, there are
methods that store the content of an array (fragment) or the elements
returned by an iterator to a DataOutput
or to a given filename. Files
are buffered using FastBufferedInputStream
and FastBufferedOutputStream
.
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.
Finally, there are useful wrapper methods that exhibit a file as a type-specific iterator.
- Since:
- 4.4
-
Method Summary
Modifier and Type Method Description static BooleanIterable
asBooleanIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static BooleanIterable
asBooleanIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static BooleanIterator
asBooleanIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static BooleanIterator
asBooleanIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static BooleanIterator
asBooleanIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static ByteIterable
asByteIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static ByteIterable
asByteIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static ByteIterator
asByteIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static ByteIterator
asByteIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static ByteIterator
asByteIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static CharIterable
asCharIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static CharIterable
asCharIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static CharIterator
asCharIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static CharIterator
asCharIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static CharIterator
asCharIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static DoubleIterable
asDoubleIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static DoubleIterable
asDoubleIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static DoubleIterator
asDoubleIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static DoubleIterator
asDoubleIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static DoubleIterator
asDoubleIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static FloatIterable
asFloatIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static FloatIterable
asFloatIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static FloatIterator
asFloatIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static FloatIterator
asFloatIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static FloatIterator
asFloatIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static IntIterable
asIntIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static IntIterable
asIntIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static IntIterator
asIntIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static IntIterator
asIntIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static IntIterator
asIntIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static LongIterable
asLongIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static LongIterable
asLongIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static LongIterator
asLongIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static LongIterator
asLongIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static LongIterator
asLongIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static ShortIterable
asShortIterable(java.io.File file)
Wraps a file given by aFile
object into an iterable object.static ShortIterable
asShortIterable(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterable object.static ShortIterator
asShortIterator(java.io.DataInput dataInput)
Wraps the given data input stream into an iterator.static ShortIterator
asShortIterator(java.io.File file)
Wraps a file given by aFile
object into an iterator.static ShortIterator
asShortIterator(java.lang.CharSequence filename)
Wraps a file given by a pathname into an iterator.static int
loadBooleans(java.io.DataInput dataInput, boolean[] array)
Loads elements from a given data input, storing them in a given array.static long
loadBooleans(java.io.DataInput dataInput, boolean[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadBooleans(java.io.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(java.io.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(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadBooleans(java.io.File file, boolean[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadBooleans(java.io.File file, boolean[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadBooleans(java.io.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(java.io.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(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadBooleans(java.lang.CharSequence filename, boolean[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadBooleans(java.lang.CharSequence filename, boolean[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadBooleans(java.lang.CharSequence filename, boolean[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadBooleans(java.lang.CharSequence filename, boolean[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static boolean[][]
loadBooleansBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static boolean[][]
loadBooleansBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static int
loadBytes(java.io.DataInput dataInput, byte[] array)
Loads elements from a given data input, storing them in a given array.static long
loadBytes(java.io.DataInput dataInput, byte[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadBytes(java.io.DataInput dataInput, byte[][] array, long offset, long length)
Loads elements from a given data input, storing them in a given big-array fragment.static int
loadBytes(java.io.DataInput dataInput, byte[] array, int offset, int length)
Loads elements from a given data input, storing them in a given array fragment.static byte[]
loadBytes(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadBytes(java.io.File file, byte[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadBytes(java.io.File file, byte[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadBytes(java.io.File file, byte[][] array, long offset, long length)
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadBytes(java.io.File file, byte[] array, int offset, int length)
Loads elements from a file given by aFile
object, storing them in a given array fragment.static int
loadBytes(java.io.InputStream inputStream, byte[] array)
Loads bytes from a given input stream, storing them in a given array.static long
loadBytes(java.io.InputStream inputStream, byte[][] array)
Loads bytes from a given input stream, storing them in a given big array.static long
loadBytes(java.io.InputStream inputStream, byte[][] array, long offset, long length)
Loads bytes from a given input stream, storing them in a given big-array fragment.static int
loadBytes(java.io.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(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadBytes(java.lang.CharSequence filename, byte[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadBytes(java.lang.CharSequence filename, byte[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadBytes(java.lang.CharSequence filename, byte[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadBytes(java.lang.CharSequence filename, byte[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static byte[][]
loadBytesBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static byte[][]
loadBytesBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static int
loadChars(java.io.DataInput dataInput, char[] array)
Loads elements from a given data input, storing them in a given array.static long
loadChars(java.io.DataInput dataInput, char[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadChars(java.io.DataInput dataInput, char[][] array, long offset, long length)
Loads elements from a given data input, storing them in a given big-array fragment.static int
loadChars(java.io.DataInput dataInput, char[] array, int offset, int length)
Loads elements from a given data input, storing them in a given array fragment.static char[]
loadChars(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadChars(java.io.File file, char[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadChars(java.io.File file, char[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadChars(java.io.File file, char[][] array, long offset, long length)
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadChars(java.io.File file, char[] array, int offset, int length)
Loads elements from a file given by aFile
object, storing them in a given array fragment.static char[]
loadChars(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadChars(java.lang.CharSequence filename, char[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadChars(java.lang.CharSequence filename, char[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadChars(java.lang.CharSequence filename, char[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadChars(java.lang.CharSequence filename, char[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static char[][]
loadCharsBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static char[][]
loadCharsBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static int
loadDoubles(java.io.DataInput dataInput, double[] array)
Loads elements from a given data input, storing them in a given array.static long
loadDoubles(java.io.DataInput dataInput, double[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadDoubles(java.io.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(java.io.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(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadDoubles(java.io.File file, double[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadDoubles(java.io.File file, double[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadDoubles(java.io.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(java.io.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(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadDoubles(java.lang.CharSequence filename, double[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadDoubles(java.lang.CharSequence filename, double[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadDoubles(java.lang.CharSequence filename, double[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadDoubles(java.lang.CharSequence filename, double[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static double[][]
loadDoublesBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static double[][]
loadDoublesBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static int
loadFloats(java.io.DataInput dataInput, float[] array)
Loads elements from a given data input, storing them in a given array.static long
loadFloats(java.io.DataInput dataInput, float[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadFloats(java.io.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(java.io.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(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadFloats(java.io.File file, float[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadFloats(java.io.File file, float[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadFloats(java.io.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(java.io.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(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadFloats(java.lang.CharSequence filename, float[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadFloats(java.lang.CharSequence filename, float[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadFloats(java.lang.CharSequence filename, float[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadFloats(java.lang.CharSequence filename, float[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static float[][]
loadFloatsBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static float[][]
loadFloatsBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static int
loadInts(java.io.DataInput dataInput, int[] array)
Loads elements from a given data input, storing them in a given array.static long
loadInts(java.io.DataInput dataInput, int[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadInts(java.io.DataInput dataInput, int[][] array, long offset, long length)
Loads elements from a given data input, storing them in a given big-array fragment.static int
loadInts(java.io.DataInput dataInput, int[] array, int offset, int length)
Loads elements from a given data input, storing them in a given array fragment.static int[]
loadInts(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadInts(java.io.File file, int[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadInts(java.io.File file, int[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadInts(java.io.File file, int[][] array, long offset, long length)
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadInts(java.io.File file, int[] array, int offset, int length)
Loads elements from a file given by aFile
object, storing them in a given array fragment.static int[]
loadInts(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadInts(java.lang.CharSequence filename, int[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadInts(java.lang.CharSequence filename, int[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadInts(java.lang.CharSequence filename, int[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadInts(java.lang.CharSequence filename, int[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static int[][]
loadIntsBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static int[][]
loadIntsBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static int
loadLongs(java.io.DataInput dataInput, long[] array)
Loads elements from a given data input, storing them in a given array.static long
loadLongs(java.io.DataInput dataInput, long[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadLongs(java.io.DataInput dataInput, long[][] array, long offset, long length)
Loads elements from a given data input, storing them in a given big-array fragment.static int
loadLongs(java.io.DataInput dataInput, long[] array, int offset, int length)
Loads elements from a given data input, storing them in a given array fragment.static long[]
loadLongs(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadLongs(java.io.File file, long[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadLongs(java.io.File file, long[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadLongs(java.io.File file, long[][] array, long offset, long length)
Loads elements from a file given by aFile
object, storing them in a given big-array fragment.static int
loadLongs(java.io.File file, long[] array, int offset, int length)
Loads elements from a file given by aFile
object, storing them in a given array fragment.static long[]
loadLongs(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadLongs(java.lang.CharSequence filename, long[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadLongs(java.lang.CharSequence filename, long[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadLongs(java.lang.CharSequence filename, long[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadLongs(java.lang.CharSequence filename, long[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static long[][]
loadLongsBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static long[][]
loadLongsBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static java.lang.Object
loadObject(java.io.File file)
Loads an object from a file given by aFile
object.static java.lang.Object
loadObject(java.io.InputStream s)
Loads an object from a given input stream.static java.lang.Object
loadObject(java.lang.CharSequence filename)
Loads an object from a file given by a pathname.static int
loadShorts(java.io.DataInput dataInput, short[] array)
Loads elements from a given data input, storing them in a given array.static long
loadShorts(java.io.DataInput dataInput, short[][] array)
Loads elements from a given data input, storing them in a given big array.static long
loadShorts(java.io.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(java.io.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(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new array.static int
loadShorts(java.io.File file, short[] array)
Loads elements from a file given by aFile
object, storing them in a given array.static long
loadShorts(java.io.File file, short[][] array)
Loads elements from a file given by aFile
object, storing them in a given big array.static long
loadShorts(java.io.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(java.io.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(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new array.static int
loadShorts(java.lang.CharSequence filename, short[] array)
Loads elements from a file given by a pathname, storing them in a given array.static long
loadShorts(java.lang.CharSequence filename, short[][] array)
Loads elements from a file given by a pathname, storing them in a given big array.static long
loadShorts(java.lang.CharSequence filename, short[][] array, long offset, long length)
Loads elements from a file given by a pathname, storing them in a given big-array fragment.static int
loadShorts(java.lang.CharSequence filename, short[] array, int offset, int length)
Loads elements from a file given by a pathname, storing them in a given array fragment.static short[][]
loadShortsBig(java.io.File file)
Loads elements from a file given by aFile
object, storing them in a new big array.static short[][]
loadShortsBig(java.lang.CharSequence filename)
Loads elements from a file given by a filename, storing them in a new big array.static void
storeBooleans(boolean[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeBooleans(boolean[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeBooleans(boolean[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeBooleans(boolean[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeBooleans(boolean[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeBooleans(boolean[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeBooleans(boolean[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeBooleans(boolean[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeBooleans(boolean[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeBooleans(boolean[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeBooleans(boolean[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeBooleans(boolean[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeBooleans(BooleanIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeBooleans(BooleanIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeBooleans(BooleanIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeBytes(byte[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeBytes(byte[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeBytes(byte[][] array, long offset, long length, java.io.OutputStream outputStream)
Stores a big-array fragment to a given output stream.static void
storeBytes(byte[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeBytes(byte[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeBytes(byte[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeBytes(byte[][] array, java.io.OutputStream outputStream)
Stores a big array to a given output stream.static void
storeBytes(byte[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeBytes(byte[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeBytes(byte[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeBytes(byte[] array, int offset, int length, java.io.OutputStream outputStream)
Stores an array fragment to a given output stream.static void
storeBytes(byte[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeBytes(byte[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeBytes(byte[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeBytes(byte[] array, java.io.OutputStream outputStream)
Stores an array to a given output stream.static void
storeBytes(byte[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeBytes(ByteIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeBytes(ByteIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeBytes(ByteIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeChars(char[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeChars(char[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeChars(char[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeChars(char[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeChars(char[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeChars(char[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeChars(char[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeChars(char[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeChars(char[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeChars(char[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeChars(char[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeChars(char[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeChars(CharIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeChars(CharIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeChars(CharIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeDoubles(double[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeDoubles(double[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeDoubles(double[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeDoubles(double[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeDoubles(double[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeDoubles(double[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeDoubles(double[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeDoubles(double[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeDoubles(double[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeDoubles(double[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeDoubles(double[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeDoubles(double[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeDoubles(DoubleIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeDoubles(DoubleIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeDoubles(DoubleIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeFloats(float[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeFloats(float[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeFloats(float[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeFloats(float[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeFloats(float[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeFloats(float[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeFloats(float[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeFloats(float[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeFloats(float[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeFloats(float[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeFloats(float[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeFloats(float[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeFloats(FloatIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeFloats(FloatIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeFloats(FloatIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeInts(int[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeInts(int[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeInts(int[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeInts(int[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeInts(int[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeInts(int[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeInts(int[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeInts(int[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeInts(int[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeInts(int[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeInts(int[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeInts(int[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeInts(IntIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeInts(IntIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeInts(IntIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeLongs(long[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeLongs(long[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeLongs(long[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeLongs(long[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeLongs(long[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeLongs(long[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeLongs(long[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeLongs(long[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeLongs(long[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeLongs(long[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeLongs(long[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeLongs(long[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeLongs(LongIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeLongs(LongIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeLongs(LongIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.static void
storeObject(java.lang.Object o, java.io.File file)
Stores an object in a file given by aFile
object.static void
storeObject(java.lang.Object o, java.io.OutputStream s)
Stores an object in a given output stream.static void
storeObject(java.lang.Object o, java.lang.CharSequence filename)
Stores an object in a file given by a pathname.static void
storeShorts(short[][] array, long offset, long length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeShorts(short[][] array, long offset, long length, java.io.File file)
Stores a big-array fragment to a file given by aFile
object.static void
storeShorts(short[][] array, long offset, long length, java.lang.CharSequence filename)
Stores a big-array fragment to a file given by a pathname.static void
storeShorts(short[][] array, java.io.DataOutput dataOutput)
Stores a big array to a given data output.static void
storeShorts(short[][] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeShorts(short[][] array, java.lang.CharSequence filename)
Stores a big array to a file given by a pathname.static void
storeShorts(short[] array, int offset, int length, java.io.DataOutput dataOutput)
Stores an array fragment to a given data output.static void
storeShorts(short[] array, int offset, int length, java.io.File file)
Stores an array fragment to a file given by aFile
object.static void
storeShorts(short[] array, int offset, int length, java.lang.CharSequence filename)
Stores an array fragment to a file given by a pathname.static void
storeShorts(short[] array, java.io.DataOutput dataOutput)
Stores an array to a given data output.static void
storeShorts(short[] array, java.io.File file)
Stores an array to a file given by aFile
object.static void
storeShorts(short[] array, java.lang.CharSequence filename)
Stores an array to a file given by a pathname.static void
storeShorts(ShortIterator i, java.io.DataOutput dataOutput)
Stores the element returned by an iterator to a given data output.static void
storeShorts(ShortIterator i, java.io.File file)
Stores the element returned by an iterator to a file given by aFile
object.static void
storeShorts(ShortIterator i, java.lang.CharSequence filename)
Stores the element returned by an iterator to a file given by a pathname.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
storeObject
public static void storeObject(java.lang.Object o, java.io.File file) throws java.io.IOExceptionStores an object in a file given by aFile
object.- Parameters:
o
- an object.file
- a file.- Throws:
java.io.IOException
- See Also:
loadObject(File)
-
storeObject
public static void storeObject(java.lang.Object o, java.lang.CharSequence filename) throws java.io.IOExceptionStores an object in a file given by a pathname.- Parameters:
o
- an object.filename
- a filename.- Throws:
java.io.IOException
- See Also:
loadObject(CharSequence)
-
loadObject
public static java.lang.Object loadObject(java.io.File file) throws java.io.IOException, java.lang.ClassNotFoundExceptionLoads an object from a file given by aFile
object.- Parameters:
file
- a file.- Returns:
- the object stored under the given file.
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
- See Also:
storeObject(Object, File)
-
loadObject
public static java.lang.Object loadObject(java.lang.CharSequence filename) throws java.io.IOException, java.lang.ClassNotFoundExceptionLoads an object from a file given by a pathname.- Parameters:
filename
- a filename.- Returns:
- the object stored under the given filename.
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
- See Also:
storeObject(Object, CharSequence)
-
storeObject
public static void storeObject(java.lang.Object o, java.io.OutputStream s) throws java.io.IOExceptionStores 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:
java.io.IOException
- See Also:
loadObject(InputStream)
-
loadObject
public static java.lang.Object loadObject(java.io.InputStream s) throws java.io.IOException, java.lang.ClassNotFoundExceptionLoads 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:
java.io.IOException
java.lang.ClassNotFoundException
- See Also:
storeObject(Object, OutputStream)
-
loadBooleans
public static int loadBooleans(java.io.DataInput dataInput, boolean[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static int loadBooleans(java.io.DataInput dataInput, boolean[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static int loadBooleans(java.io.File file, boolean[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static int loadBooleans(java.lang.CharSequence filename, boolean[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBooleans
public static int loadBooleans(java.io.File file, boolean[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static int loadBooleans(java.lang.CharSequence filename, boolean[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBooleans
public static boolean[] loadBooleans(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static boolean[] loadBooleans(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadBooleans
public static long loadBooleans(java.io.DataInput dataInput, boolean[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadBooleans
public static long loadBooleans(java.io.DataInput dataInput, boolean[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static long loadBooleans(java.io.File file, boolean[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static long loadBooleans(java.lang.CharSequence filename, boolean[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBooleans
public static long loadBooleans(java.io.File file, boolean[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleans
public static long loadBooleans(java.lang.CharSequence filename, boolean[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBooleansBig
public static boolean[][] loadBooleansBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBooleansBig
public static boolean[][] loadBooleansBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(BooleanIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeBooleans
public static void storeBooleans(BooleanIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asBooleanIterator
public static BooleanIterator asBooleanIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asBooleanIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asBooleanIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadBytes
public static int loadBytes(java.io.InputStream inputStream, byte[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static int loadBytes(java.io.InputStream inputStream, byte[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, java.io.OutputStream outputStream) throws java.io.IOExceptionStores an array fragment to a given output stream.Note that this method is going to be significantly faster than
storeBytes(byte[],int,int,DataOutput)
as it usesOutputStream
's bulk-read 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, java.io.OutputStream outputStream) throws java.io.IOExceptionStores an array to a given output stream.Note that this method is going to be significantly faster than
storeBytes(byte[],DataOutput)
as it usesOutputStream
's bulk-read methods.- Parameters:
array
- an array whose elements will be written tooutputStream
.outputStream
- an output stream.- Throws:
java.io.IOException
-
loadBytes
public static long loadBytes(java.io.InputStream inputStream, byte[][] array, long offset, long length) throws java.io.IOExceptionLoads bytes from a given input stream, 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:
java.io.IOException
-
loadBytes
public static long loadBytes(java.io.InputStream inputStream, byte[][] array) throws java.io.IOExceptionLoads bytes from a given input stream, 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, java.io.OutputStream outputStream) throws java.io.IOExceptionStores a big-array fragment to a given output stream.Note that this method is going to be significantly faster than
storeBytes(byte[][],long,long,DataOutput)
as it usesOutputStream
's bulk-read 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, java.io.OutputStream outputStream) throws java.io.IOExceptionStores a big array to a given output stream.Note that this method is going to be significantly faster than
storeBytes(byte[][],DataOutput)
as it usesOutputStream
's bulk-read methods.- Parameters:
array
- a big array whose elements will be written tooutputStream
.outputStream
- an output stream.- Throws:
java.io.IOException
-
loadBytes
public static int loadBytes(java.io.DataInput dataInput, byte[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static int loadBytes(java.io.DataInput dataInput, byte[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static int loadBytes(java.io.File file, byte[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static int loadBytes(java.lang.CharSequence filename, byte[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBytes
public static int loadBytes(java.io.File file, byte[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static int loadBytes(java.lang.CharSequence filename, byte[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBytes
public static byte[] loadBytes(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static byte[] loadBytes(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadBytes
public static long loadBytes(java.io.DataInput dataInput, byte[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadBytes
public static long loadBytes(java.io.DataInput dataInput, byte[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static long loadBytes(java.io.File file, byte[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static long loadBytes(java.lang.CharSequence filename, byte[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBytes
public static long loadBytes(java.io.File file, byte[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytes
public static long loadBytes(java.lang.CharSequence filename, byte[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadBytesBig
public static byte[][] loadBytesBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadBytesBig
public static byte[][] loadBytesBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(byte[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(ByteIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeBytes
public static void storeBytes(ByteIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asByteIterator
public static ByteIterator asByteIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asByteIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asByteIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadChars
public static int loadChars(java.io.DataInput dataInput, char[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static int loadChars(java.io.DataInput dataInput, char[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static int loadChars(java.io.File file, char[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static int loadChars(java.lang.CharSequence filename, char[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadChars
public static int loadChars(java.io.File file, char[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static int loadChars(java.lang.CharSequence filename, char[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadChars
public static char[] loadChars(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static char[] loadChars(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeChars
public static void storeChars(char[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadChars
public static long loadChars(java.io.DataInput dataInput, char[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadChars
public static long loadChars(java.io.DataInput dataInput, char[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static long loadChars(java.io.File file, char[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static long loadChars(java.lang.CharSequence filename, char[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadChars
public static long loadChars(java.io.File file, char[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadChars
public static long loadChars(java.lang.CharSequence filename, char[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadCharsBig
public static char[][] loadCharsBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadCharsBig
public static char[][] loadCharsBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeChars
public static void storeChars(char[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(char[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(CharIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeChars
public static void storeChars(CharIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asCharIterator
public static CharIterator asCharIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asCharIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asCharIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadShorts
public static int loadShorts(java.io.DataInput dataInput, short[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static int loadShorts(java.io.DataInput dataInput, short[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static int loadShorts(java.io.File file, short[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static int loadShorts(java.lang.CharSequence filename, short[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadShorts
public static int loadShorts(java.io.File file, short[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static int loadShorts(java.lang.CharSequence filename, short[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadShorts
public static short[] loadShorts(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static short[] loadShorts(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeShorts
public static void storeShorts(short[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadShorts
public static long loadShorts(java.io.DataInput dataInput, short[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadShorts
public static long loadShorts(java.io.DataInput dataInput, short[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static long loadShorts(java.io.File file, short[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static long loadShorts(java.lang.CharSequence filename, short[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadShorts
public static long loadShorts(java.io.File file, short[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShorts
public static long loadShorts(java.lang.CharSequence filename, short[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadShortsBig
public static short[][] loadShortsBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadShortsBig
public static short[][] loadShortsBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeShorts
public static void storeShorts(short[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(short[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(ShortIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeShorts
public static void storeShorts(ShortIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asShortIterator
public static ShortIterator asShortIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asShortIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asShortIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadInts
public static int loadInts(java.io.DataInput dataInput, int[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static int loadInts(java.io.DataInput dataInput, int[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static int loadInts(java.io.File file, int[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static int loadInts(java.lang.CharSequence filename, int[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadInts
public static int loadInts(java.io.File file, int[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static int loadInts(java.lang.CharSequence filename, int[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadInts
public static int[] loadInts(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static int[] loadInts(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeInts
public static void storeInts(int[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadInts
public static long loadInts(java.io.DataInput dataInput, int[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadInts
public static long loadInts(java.io.DataInput dataInput, int[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static long loadInts(java.io.File file, int[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static long loadInts(java.lang.CharSequence filename, int[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadInts
public static long loadInts(java.io.File file, int[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadInts
public static long loadInts(java.lang.CharSequence filename, int[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadIntsBig
public static int[][] loadIntsBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadIntsBig
public static int[][] loadIntsBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeInts
public static void storeInts(int[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(int[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(IntIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeInts
public static void storeInts(IntIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asIntIterator
public static IntIterator asIntIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asIntIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asIntIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadFloats
public static int loadFloats(java.io.DataInput dataInput, float[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static int loadFloats(java.io.DataInput dataInput, float[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static int loadFloats(java.io.File file, float[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static int loadFloats(java.lang.CharSequence filename, float[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadFloats
public static int loadFloats(java.io.File file, float[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static int loadFloats(java.lang.CharSequence filename, float[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadFloats
public static float[] loadFloats(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static float[] loadFloats(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeFloats
public static void storeFloats(float[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadFloats
public static long loadFloats(java.io.DataInput dataInput, float[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadFloats
public static long loadFloats(java.io.DataInput dataInput, float[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static long loadFloats(java.io.File file, float[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static long loadFloats(java.lang.CharSequence filename, float[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadFloats
public static long loadFloats(java.io.File file, float[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloats
public static long loadFloats(java.lang.CharSequence filename, float[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadFloatsBig
public static float[][] loadFloatsBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadFloatsBig
public static float[][] loadFloatsBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeFloats
public static void storeFloats(float[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(float[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(FloatIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeFloats
public static void storeFloats(FloatIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asFloatIterator
public static FloatIterator asFloatIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asFloatIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asFloatIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadLongs
public static int loadLongs(java.io.DataInput dataInput, long[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static int loadLongs(java.io.DataInput dataInput, long[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static int loadLongs(java.io.File file, long[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static int loadLongs(java.lang.CharSequence filename, long[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadLongs
public static int loadLongs(java.io.File file, long[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static int loadLongs(java.lang.CharSequence filename, long[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadLongs
public static long[] loadLongs(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static long[] loadLongs(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeLongs
public static void storeLongs(long[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadLongs
public static long loadLongs(java.io.DataInput dataInput, long[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadLongs
public static long loadLongs(java.io.DataInput dataInput, long[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static long loadLongs(java.io.File file, long[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static long loadLongs(java.lang.CharSequence filename, long[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadLongs
public static long loadLongs(java.io.File file, long[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongs
public static long loadLongs(java.lang.CharSequence filename, long[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadLongsBig
public static long[][] loadLongsBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadLongsBig
public static long[][] loadLongsBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeLongs
public static void storeLongs(long[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(long[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(LongIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeLongs
public static void storeLongs(LongIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asLongIterator
public static LongIterator asLongIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asLongIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asLongIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-
loadDoubles
public static int loadDoubles(java.io.DataInput dataInput, double[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static int loadDoubles(java.io.DataInput dataInput, double[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static int loadDoubles(java.io.File file, double[] array, int offset, int length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static int loadDoubles(java.lang.CharSequence filename, double[] array, int offset, int length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadDoubles
public static int loadDoubles(java.io.File file, double[] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static int loadDoubles(java.lang.CharSequence filename, double[] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadDoubles
public static double[] loadDoubles(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static double[] loadDoubles(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores an array to a given data output.- Parameters:
array
- an array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, java.io.File file) throws java.io.IOExceptionStores an array fragment to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array fragment to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores an array to a file given by a pathname.- Parameters:
array
- an array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
loadDoubles
public static long loadDoubles(java.io.DataInput dataInput, double[][] array, long offset, long length) throws java.io.IOExceptionLoads 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 ofbigArray
to be filled.length
- the number of elements ofbigArray
to be filled.- Returns:
- the number of elements actually read from
dataInput
(it might be less thanlength
ifdataInput
ends). - Throws:
java.io.IOException
-
loadDoubles
public static long loadDoubles(java.io.DataInput dataInput, double[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static long loadDoubles(java.io.File file, double[][] array, long offset, long length) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static long loadDoubles(java.lang.CharSequence filename, double[][] array, long offset, long length) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadDoubles
public static long loadDoubles(java.io.File file, double[][] array) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoubles
public static long loadDoubles(java.lang.CharSequence filename, double[][] array) throws java.io.IOExceptionLoads elements from a file given by a pathname, 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:
java.io.IOException
-
loadDoublesBig
public static double[][] loadDoublesBig(java.io.File file) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
loadDoublesBig
public static double[][] loadDoublesBig(java.lang.CharSequence filename) throws java.io.IOExceptionLoads 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:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[][] array, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores a big array to a given data output.- Parameters:
array
- a big array whose elements will be written todataOutput
.dataOutput
- a data output.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, java.io.File file) throws java.io.IOExceptionStores a big-array fragment to a file given by aFile
object.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.file
- a file.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big-array fragment to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.offset
- the index of the first element ofarray
to be written.length
- the number of elements ofarray
to be written.filename
- a filename.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[][] array, java.io.File file) throws java.io.IOExceptionStores an array to a file given by aFile
object.- Parameters:
array
- an array whose elements will be written tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(double[][] array, java.lang.CharSequence filename) throws java.io.IOExceptionStores a big array to a file given by a pathname.- Parameters:
array
- a big array whose elements will be written tofilename
.filename
- a filename.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(DoubleIterator i, java.io.DataOutput dataOutput) throws java.io.IOExceptionStores 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:
java.io.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 tofilename
.file
- a file.- Throws:
java.io.IOException
-
storeDoubles
public static void storeDoubles(DoubleIterator i, java.lang.CharSequence filename) throws java.io.IOExceptionStores the element returned by an iterator to a file given by a pathname.- Parameters:
i
- an iterator whose output will be written tofilename
.filename
- a filename.- Throws:
java.io.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:
java.io.IOException
-
asDoubleIterator
public static DoubleIterator asDoubleIterator(java.lang.CharSequence filename) throws java.io.IOExceptionWraps a file given by a pathname into an iterator.- Parameters:
filename
- a filename.- Throws:
java.io.IOException
-
asDoubleIterable
Wraps a file given by aFile
object into an iterable object.- Parameters:
file
- a file.
-
asDoubleIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename
- a filename.
-