Class BinIO
public class BinIO extends 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 BooleanIterableasBooleanIterable(File file)Wraps a file given by aFileobject into an iterable object.static BooleanIterableasBooleanIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static BooleanIteratorasBooleanIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static BooleanIteratorasBooleanIterator(File file)Wraps a file given by aFileobject into an iterator.static BooleanIteratorasBooleanIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static ByteIterableasByteIterable(File file)Wraps a file given by aFileobject into an iterable object.static ByteIterableasByteIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static ByteIteratorasByteIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static ByteIteratorasByteIterator(File file)Wraps a file given by aFileobject into an iterator.static ByteIteratorasByteIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static CharIterableasCharIterable(File file)Wraps a file given by aFileobject into an iterable object.static CharIterableasCharIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static CharIteratorasCharIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static CharIteratorasCharIterator(File file)Wraps a file given by aFileobject into an iterator.static CharIteratorasCharIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static DoubleIterableasDoubleIterable(File file)Wraps a file given by aFileobject into an iterable object.static DoubleIterableasDoubleIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static DoubleIteratorasDoubleIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static DoubleIteratorasDoubleIterator(File file)Wraps a file given by aFileobject into an iterator.static DoubleIteratorasDoubleIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static FloatIterableasFloatIterable(File file)Wraps a file given by aFileobject into an iterable object.static FloatIterableasFloatIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static FloatIteratorasFloatIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static FloatIteratorasFloatIterator(File file)Wraps a file given by aFileobject into an iterator.static FloatIteratorasFloatIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static IntIterableasIntIterable(File file)Wraps a file given by aFileobject into an iterable object.static IntIterableasIntIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static IntIteratorasIntIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static IntIteratorasIntIterator(File file)Wraps a file given by aFileobject into an iterator.static IntIteratorasIntIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static LongIterableasLongIterable(File file)Wraps a file given by aFileobject into an iterable object.static LongIterableasLongIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static LongIteratorasLongIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static LongIteratorasLongIterator(File file)Wraps a file given by aFileobject into an iterator.static LongIteratorasLongIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static ShortIterableasShortIterable(File file)Wraps a file given by aFileobject into an iterable object.static ShortIterableasShortIterable(CharSequence filename)Wraps a file given by a pathname into an iterable object.static ShortIteratorasShortIterator(DataInput dataInput)Wraps the given data input stream into an iterator.static ShortIteratorasShortIterator(File file)Wraps a file given by aFileobject into an iterator.static ShortIteratorasShortIterator(CharSequence filename)Wraps a file given by a pathname into an iterator.static intloadBooleans(DataInput dataInput, boolean[] array)Loads elements from a given data input, storing them in a given array.static longloadBooleans(DataInput dataInput, boolean[][] array)Loads elements from a given data input, storing them in a given big array.static longloadBooleans(DataInput dataInput, boolean[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadBooleans(DataInput dataInput, boolean[] array, int offset, int length)Loads elements from a given data input, storing them in a given array fragment.static boolean[]loadBooleans(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadBooleans(File file, boolean[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadBooleans(File file, boolean[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadBooleans(File file, boolean[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadBooleans(File file, boolean[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static boolean[]loadBooleans(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadBooleans(CharSequence filename, boolean[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadBooleans(CharSequence filename, boolean[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadBooleans(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 intloadBooleans(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static boolean[][]loadBooleansBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static intloadBytes(DataInput dataInput, byte[] array)Loads elements from a given data input, storing them in a given array.static longloadBytes(DataInput dataInput, byte[][] array)Loads elements from a given data input, storing them in a given big array.static longloadBytes(DataInput dataInput, byte[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadBytes(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(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadBytes(File file, byte[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadBytes(File file, byte[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadBytes(File file, byte[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadBytes(File file, byte[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static intloadBytes(InputStream inputStream, byte[] array)Loads bytes from a given input stream, storing them in a given array.static longloadBytes(InputStream inputStream, byte[][] array)Loads bytes from a given input stream, storing them in a given big array.static longloadBytes(InputStream inputStream, byte[][] array, long offset, long length)Loads bytes from a given input stream, storing them in a given big-array fragment.static intloadBytes(InputStream inputStream, byte[] array, int offset, int length)Loads bytes from a given input stream, storing them in a given array fragment.static byte[]loadBytes(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadBytes(CharSequence filename, byte[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadBytes(CharSequence filename, byte[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadBytes(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 intloadBytes(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static byte[][]loadBytesBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static intloadChars(DataInput dataInput, char[] array)Loads elements from a given data input, storing them in a given array.static longloadChars(DataInput dataInput, char[][] array)Loads elements from a given data input, storing them in a given big array.static longloadChars(DataInput dataInput, char[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadChars(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(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadChars(File file, char[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadChars(File file, char[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadChars(File file, char[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadChars(File file, char[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static char[]loadChars(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadChars(CharSequence filename, char[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadChars(CharSequence filename, char[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadChars(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 intloadChars(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static char[][]loadCharsBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static intloadDoubles(DataInput dataInput, double[] array)Loads elements from a given data input, storing them in a given array.static longloadDoubles(DataInput dataInput, double[][] array)Loads elements from a given data input, storing them in a given big array.static longloadDoubles(DataInput dataInput, double[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadDoubles(DataInput dataInput, double[] array, int offset, int length)Loads elements from a given data input, storing them in a given array fragment.static double[]loadDoubles(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadDoubles(File file, double[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadDoubles(File file, double[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadDoubles(File file, double[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadDoubles(File file, double[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static double[]loadDoubles(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadDoubles(CharSequence filename, double[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadDoubles(CharSequence filename, double[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadDoubles(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 intloadDoubles(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static double[][]loadDoublesBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static intloadFloats(DataInput dataInput, float[] array)Loads elements from a given data input, storing them in a given array.static longloadFloats(DataInput dataInput, float[][] array)Loads elements from a given data input, storing them in a given big array.static longloadFloats(DataInput dataInput, float[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadFloats(DataInput dataInput, float[] array, int offset, int length)Loads elements from a given data input, storing them in a given array fragment.static float[]loadFloats(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadFloats(File file, float[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadFloats(File file, float[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadFloats(File file, float[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadFloats(File file, float[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static float[]loadFloats(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadFloats(CharSequence filename, float[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadFloats(CharSequence filename, float[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadFloats(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 intloadFloats(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static float[][]loadFloatsBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static intloadInts(DataInput dataInput, int[] array)Loads elements from a given data input, storing them in a given array.static longloadInts(DataInput dataInput, int[][] array)Loads elements from a given data input, storing them in a given big array.static longloadInts(DataInput dataInput, int[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadInts(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(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadInts(File file, int[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadInts(File file, int[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadInts(File file, int[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadInts(File file, int[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static int[]loadInts(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadInts(CharSequence filename, int[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadInts(CharSequence filename, int[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadInts(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 intloadInts(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static int[][]loadIntsBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static intloadLongs(DataInput dataInput, long[] array)Loads elements from a given data input, storing them in a given array.static longloadLongs(DataInput dataInput, long[][] array)Loads elements from a given data input, storing them in a given big array.static longloadLongs(DataInput dataInput, long[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadLongs(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(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadLongs(File file, long[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadLongs(File file, long[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadLongs(File file, long[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadLongs(File file, long[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static long[]loadLongs(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadLongs(CharSequence filename, long[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadLongs(CharSequence filename, long[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadLongs(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 intloadLongs(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static long[][]loadLongsBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static ObjectloadObject(File file)Loads an object from a file given by aFileobject.static ObjectloadObject(InputStream s)Loads an object from a given input stream.static ObjectloadObject(CharSequence filename)Loads an object from a file given by a pathname.static intloadShorts(DataInput dataInput, short[] array)Loads elements from a given data input, storing them in a given array.static longloadShorts(DataInput dataInput, short[][] array)Loads elements from a given data input, storing them in a given big array.static longloadShorts(DataInput dataInput, short[][] array, long offset, long length)Loads elements from a given data input, storing them in a given big-array fragment.static intloadShorts(DataInput dataInput, short[] array, int offset, int length)Loads elements from a given data input, storing them in a given array fragment.static short[]loadShorts(File file)Loads elements from a file given by aFileobject, storing them in a new array.static intloadShorts(File file, short[] array)Loads elements from a file given by aFileobject, storing them in a given array.static longloadShorts(File file, short[][] array)Loads elements from a file given by aFileobject, storing them in a given big array.static longloadShorts(File file, short[][] array, long offset, long length)Loads elements from a file given by aFileobject, storing them in a given big-array fragment.static intloadShorts(File file, short[] array, int offset, int length)Loads elements from a file given by aFileobject, storing them in a given array fragment.static short[]loadShorts(CharSequence filename)Loads elements from a file given by a filename, storing them in a new array.static intloadShorts(CharSequence filename, short[] array)Loads elements from a file given by a pathname, storing them in a given array.static longloadShorts(CharSequence filename, short[][] array)Loads elements from a file given by a pathname, storing them in a given big array.static longloadShorts(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 intloadShorts(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(File file)Loads elements from a file given by aFileobject, storing them in a new big array.static short[][]loadShortsBig(CharSequence filename)Loads elements from a file given by a filename, storing them in a new big array.static voidstoreBooleans(boolean[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreBooleans(boolean[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreBooleans(boolean[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreBooleans(boolean[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreBooleans(boolean[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreBooleans(boolean[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreBooleans(boolean[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreBooleans(boolean[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreBooleans(boolean[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreBooleans(boolean[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreBooleans(boolean[] array, File file)Stores an array to a file given by aFileobject.static voidstoreBooleans(boolean[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreBooleans(BooleanIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreBooleans(BooleanIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreBooleans(BooleanIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreBytes(byte[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreBytes(byte[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreBytes(byte[][] array, long offset, long length, OutputStream outputStream)Stores a big-array fragment to a given output stream.static voidstoreBytes(byte[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreBytes(byte[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreBytes(byte[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreBytes(byte[][] array, OutputStream outputStream)Stores a big array to a given output stream.static voidstoreBytes(byte[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreBytes(byte[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreBytes(byte[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreBytes(byte[] array, int offset, int length, OutputStream outputStream)Stores an array fragment to a given output stream.static voidstoreBytes(byte[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreBytes(byte[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreBytes(byte[] array, File file)Stores an array to a file given by aFileobject.static voidstoreBytes(byte[] array, OutputStream outputStream)Stores an array to a given output stream.static voidstoreBytes(byte[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreBytes(ByteIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreBytes(ByteIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreBytes(ByteIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreChars(char[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreChars(char[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreChars(char[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreChars(char[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreChars(char[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreChars(char[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreChars(char[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreChars(char[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreChars(char[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreChars(char[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreChars(char[] array, File file)Stores an array to a file given by aFileobject.static voidstoreChars(char[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreChars(CharIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreChars(CharIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreChars(CharIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreDoubles(double[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreDoubles(double[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreDoubles(double[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreDoubles(double[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreDoubles(double[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreDoubles(double[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreDoubles(double[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreDoubles(double[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreDoubles(double[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreDoubles(double[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreDoubles(double[] array, File file)Stores an array to a file given by aFileobject.static voidstoreDoubles(double[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreDoubles(DoubleIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreDoubles(DoubleIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreDoubles(DoubleIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreFloats(float[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreFloats(float[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreFloats(float[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreFloats(float[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreFloats(float[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreFloats(float[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreFloats(float[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreFloats(float[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreFloats(float[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreFloats(float[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreFloats(float[] array, File file)Stores an array to a file given by aFileobject.static voidstoreFloats(float[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreFloats(FloatIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreFloats(FloatIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreFloats(FloatIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreInts(int[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreInts(int[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreInts(int[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreInts(int[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreInts(int[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreInts(int[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreInts(int[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreInts(int[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreInts(int[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreInts(int[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreInts(int[] array, File file)Stores an array to a file given by aFileobject.static voidstoreInts(int[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreInts(IntIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreInts(IntIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreInts(IntIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreLongs(long[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreLongs(long[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreLongs(long[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreLongs(long[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreLongs(long[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreLongs(long[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreLongs(long[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreLongs(long[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreLongs(long[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreLongs(long[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreLongs(long[] array, File file)Stores an array to a file given by aFileobject.static voidstoreLongs(long[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreLongs(LongIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreLongs(LongIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreLongs(LongIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.static voidstoreObject(Object o, File file)Stores an object in a file given by aFileobject.static voidstoreObject(Object o, OutputStream s)Stores an object in a given output stream.static voidstoreObject(Object o, CharSequence filename)Stores an object in a file given by a pathname.static voidstoreShorts(short[][] array, long offset, long length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreShorts(short[][] array, long offset, long length, File file)Stores a big-array fragment to a file given by aFileobject.static voidstoreShorts(short[][] array, long offset, long length, CharSequence filename)Stores a big-array fragment to a file given by a pathname.static voidstoreShorts(short[][] array, DataOutput dataOutput)Stores a big array to a given data output.static voidstoreShorts(short[][] array, File file)Stores an array to a file given by aFileobject.static voidstoreShorts(short[][] array, CharSequence filename)Stores a big array to a file given by a pathname.static voidstoreShorts(short[] array, int offset, int length, DataOutput dataOutput)Stores an array fragment to a given data output.static voidstoreShorts(short[] array, int offset, int length, File file)Stores an array fragment to a file given by aFileobject.static voidstoreShorts(short[] array, int offset, int length, CharSequence filename)Stores an array fragment to a file given by a pathname.static voidstoreShorts(short[] array, DataOutput dataOutput)Stores an array to a given data output.static voidstoreShorts(short[] array, File file)Stores an array to a file given by aFileobject.static voidstoreShorts(short[] array, CharSequence filename)Stores an array to a file given by a pathname.static voidstoreShorts(ShortIterator i, DataOutput dataOutput)Stores the element returned by an iterator to a given data output.static voidstoreShorts(ShortIterator i, File file)Stores the element returned by an iterator to a file given by aFileobject.static voidstoreShorts(ShortIterator i, CharSequence filename)Stores the element returned by an iterator to a file given by a pathname.
-
Method Details
-
storeObject
Stores an object in a file given by aFileobject.- Parameters:
o- an object.file- a file.- Throws:
IOException- See Also:
loadObject(File)
-
storeObject
Stores an object in a file given by a pathname.- Parameters:
o- an object.filename- a filename.- Throws:
IOException- See Also:
loadObject(CharSequence)
-
loadObject
Loads an object from a file given by aFileobject.- Parameters:
file- a file.- Returns:
- the object stored under the given file.
- Throws:
IOExceptionClassNotFoundException- See Also:
storeObject(Object, File)
-
loadObject
Loads an object from a file given by a pathname.- Parameters:
filename- a filename.- Returns:
- the object stored under the given filename.
- Throws:
IOExceptionClassNotFoundException- See Also:
storeObject(Object, CharSequence)
-
storeObject
Stores an object in a given output stream. This methods bufferss, and flushes all wrappers after callingwriteObject(), but does not closes.- Parameters:
o- an object.s- an output stream.- Throws:
IOException- See Also:
loadObject(InputStream)
-
loadObject
Loads an object from a given input stream.Warning: this method buffers the input stream. As a consequence, subsequent reads from the same stream may not give the desired results, as bytes may have been read by the internal buffer, but not used by
readObject(). This is a feature, as this method is targeted at one-shot reading from streams, e.g., reading exactly one object fromSystem.in.- Parameters:
s- an input stream.- Returns:
- the object read from the given input stream.
- Throws:
IOExceptionClassNotFoundException- See Also:
storeObject(Object, OutputStream)
-
loadBytes
public static int loadBytes(InputStream inputStream, byte[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
inputStream(it might be less thanlengthifinputStreamends). - Throws:
IOException
-
loadBytes
Loads bytes from a given input stream, storing them in a given array.Note that this method is going to be significantly faster than
loadBytes(DataInput,byte[])as it usesInputStream's bulk-read methods.- Parameters:
inputStream- an input stream.array- an array which will be filled with data frominputStream.- Returns:
- the number of elements actually read from
inputStream(it might be less than the array length ifinputStreamends). - Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, OutputStream outputStream) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.outputStream- an output stream.- Throws:
IOException
-
storeBytes
Stores 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:
IOException
-
loadBytes
public static long loadBytes(InputStream inputStream, byte[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
inputStream(it might be less thanlengthifinputStreamends). - Throws:
IOException
-
loadBytes
Loads 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 ifinputStreamends). - Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, OutputStream outputStream) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.outputStream- an output stream.- Throws:
IOException
-
storeBytes
Stores 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:
IOException
-
loadBytes
public static int loadBytes(DataInput dataInput, byte[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadBytes
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadBytes
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBytes
public static int loadBytes(CharSequence filename, byte[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBytes
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBytes
Loads elements from a file given by a 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:
IOException
-
loadBytes
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadBytes
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeBytes
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeBytes
Stores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeBytes
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeBytes
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadBytes
public static long loadBytes(DataInput dataInput, byte[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadBytes
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadBytes
public static long loadBytes(File file, byte[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBytes
public static long loadBytes(CharSequence filename, byte[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBytes
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBytes
Loads elements from a file given by a 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:
IOException
-
loadBytesBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadBytesBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeBytes
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeBytes
public static void storeBytes(byte[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeBytes
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeBytes
Stores 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:
IOException
-
storeBytes
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeBytes
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeBytes
Stores 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:
IOException
-
asByteIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asByteIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asByteIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asByteIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asByteIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-
loadInts
public static int loadInts(DataInput dataInput, int[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadInts
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadInts
public static int loadInts(CharSequence filename, int[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
Loads elements from a file given by a 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:
IOException
-
loadInts
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadInts
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeInts
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeInts
Stores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeInts
public static void storeInts(int[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeInts
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeInts
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadInts
public static long loadInts(DataInput dataInput, int[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadInts
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadInts
public static long loadInts(CharSequence filename, int[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadInts
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadInts
Loads elements from a file given by a 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:
IOException
-
loadIntsBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadIntsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeInts
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeInts
public static void storeInts(int[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeInts
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeInts
Stores 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:
IOException
-
storeInts
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeInts
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeInts
Stores 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:
IOException
-
asIntIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asIntIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asIntIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asIntIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asIntIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-
loadLongs
public static int loadLongs(DataInput dataInput, long[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadLongs
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadLongs
public static int loadLongs(CharSequence filename, long[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a 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:
IOException
-
loadLongs
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeLongs
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeLongs
Stores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeLongs
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeLongs
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadLongs
public static long loadLongs(DataInput dataInput, long[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadLongs
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadLongs
public static long loadLongs(File file, long[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadLongs
public static long loadLongs(CharSequence filename, long[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadLongs
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadLongs
Loads elements from a file given by a 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:
IOException
-
loadLongsBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadLongsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeLongs
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeLongs
public static void storeLongs(long[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeLongs
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeLongs
Stores 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:
IOException
-
storeLongs
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeLongs
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeLongs
Stores 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:
IOException
-
asLongIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asLongIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asLongIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asLongIterable
Wraps a file given by aFileobject 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(DataInput dataInput, double[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadDoubles
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadDoubles
public static int loadDoubles(File file, double[] array, int offset, int length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadDoubles
public static int loadDoubles(CharSequence filename, double[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a 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:
IOException
-
loadDoubles
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeDoubles
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, File file) throws IOExceptionStores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadDoubles
public static long loadDoubles(DataInput dataInput, double[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadDoubles
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(File file, double[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadDoubles
public static long loadDoubles(CharSequence filename, double[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadDoubles
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadDoubles
Loads elements from a file given by a 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:
IOException
-
loadDoublesBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadDoublesBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeDoubles
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeDoubles
public static void storeDoubles(double[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeDoubles
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeDoubles
Stores 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:
IOException
-
storeDoubles
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeDoubles
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeDoubles
Stores 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:
IOException
-
asDoubleIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asDoubleIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asDoubleIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asDoubleIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asDoubleIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-
loadBooleans
public static int loadBooleans(DataInput dataInput, boolean[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadBooleans
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadBooleans
public static int loadBooleans(File file, boolean[] array, int offset, int length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBooleans
public static int loadBooleans(CharSequence filename, boolean[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBooleans
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by a 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:
IOException
-
loadBooleans
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeBooleans
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, File file) throws IOExceptionStores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeBooleans
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeBooleans
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadBooleans
public static long loadBooleans(DataInput dataInput, boolean[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadBooleans
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadBooleans
public static long loadBooleans(File file, boolean[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBooleans
public static long loadBooleans(CharSequence filename, boolean[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadBooleans
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadBooleans
Loads elements from a file given by a 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:
IOException
-
loadBooleansBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadBooleansBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeBooleans
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeBooleans
public static void storeBooleans(boolean[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeBooleans
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeBooleans
Stores 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:
IOException
-
storeBooleans
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeBooleans
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeBooleans
Stores 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:
IOException
-
asBooleanIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asBooleanIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asBooleanIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asBooleanIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asBooleanIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-
loadShorts
public static int loadShorts(DataInput dataInput, short[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadShorts
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadShorts
public static int loadShorts(CharSequence filename, short[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a 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:
IOException
-
loadShorts
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeShorts
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, File file) throws IOExceptionStores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeShorts
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeShorts
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadShorts
public static long loadShorts(DataInput dataInput, short[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadShorts
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadShorts
public static long loadShorts(File file, short[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadShorts
public static long loadShorts(CharSequence filename, short[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadShorts
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadShorts
Loads elements from a file given by a 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:
IOException
-
loadShortsBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadShortsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeShorts
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeShorts
public static void storeShorts(short[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeShorts
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeShorts
Stores 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:
IOException
-
storeShorts
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeShorts
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeShorts
Stores 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:
IOException
-
asShortIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asShortIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asShortIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asShortIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asShortIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-
loadChars
public static int loadChars(DataInput dataInput, char[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadChars
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadChars
public static int loadChars(CharSequence filename, char[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
Loads elements from a file given by a 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:
IOException
-
loadChars
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadChars
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeChars
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeChars
Stores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeChars
public static void storeChars(char[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeChars
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeChars
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadChars
public static long loadChars(DataInput dataInput, char[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadChars
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadChars
public static long loadChars(File file, char[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadChars
public static long loadChars(CharSequence filename, char[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadChars
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadChars
Loads elements from a file given by a 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:
IOException
-
loadCharsBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadCharsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeChars
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeChars
public static void storeChars(char[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeChars
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeChars
Stores 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:
IOException
-
storeChars
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeChars
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeChars
Stores 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:
IOException
-
asCharIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asCharIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asCharIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asCharIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asCharIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-
loadFloats
public static int loadFloats(DataInput dataInput, float[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadFloats
Loads elements from a given data input, storing them in a given array.- Parameters:
dataInput- a data input.array- an array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadFloats
public static int loadFloats(CharSequence filename, float[] array, int offset, int length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFileobject, storing them in a given array.- Parameters:
file- a file.array- an array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a 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:
IOException
-
loadFloats
Loads elements from a file given by aFileobject, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a filename, storing them in a new array.Note that the length of the returned array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- an array filled with the content of the specified file.
- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeFloats
Stores an array to a given data output.- Parameters:
array- an array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, File file) throws IOExceptionStores an array fragment to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[] array, int offset, int length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeFloats
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeFloats
Stores an array to a file given by a pathname.- Parameters:
array- an array whose elements will be written tofilename.filename- a filename.- Throws:
IOException
-
loadFloats
public static long loadFloats(DataInput dataInput, float[][] array, long offset, long length) throws 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 ofbigArrayto be filled.length- the number of elements ofbigArrayto be filled.- Returns:
- the number of elements actually read from
dataInput(it might be less thanlengthifdataInputends). - Throws:
IOException
-
loadFloats
Loads elements from a given data input, storing them in a given big array.- Parameters:
dataInput- a data input.array- a big array which will be filled with data fromdataInput.- Returns:
- the number of elements actually read from
dataInput(it might be less than the array length ifdataInputends). - Throws:
IOException
-
loadFloats
public static long loadFloats(File file, float[][] array, long offset, long length) throws IOExceptionLoads elements from a file given by aFileobject, 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadFloats
public static long loadFloats(CharSequence filename, float[][] array, long offset, long length) throws 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 ofarrayto be filled.length- the number of elements ofarrayto be filled.- Returns:
- the number of elements actually read from the given file (it might be less than
lengthif the file is too short). - Throws:
IOException
-
loadFloats
Loads elements from a file given by aFileobject, storing them in a given big array.- Parameters:
file- a file.array- a big array which will be filled with data from the specified file.- Returns:
- the number of elements actually read from the given file (it might be less than the array length if the file is too short).
- Throws:
IOException
-
loadFloats
Loads elements from a file given by a 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:
IOException
-
loadFloatsBig
Loads elements from a file given by aFileobject, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
file- a file.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
loadFloatsBig
Loads elements from a file given by a filename, storing them in a new big array.Note that the length of the returned big array will be computed dividing the specified file size by the number of bytes used to represent each element.
- Parameters:
filename- a filename.- Returns:
- a big array filled with the content of the specified file.
- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, DataOutput dataOutput) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.dataOutput- a data output.- Throws:
IOException
-
storeFloats
Stores a big array to a given data output.- Parameters:
array- a big array whose elements will be written todataOutput.dataOutput- a data output.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, File file) throws IOExceptionStores a big-array fragment to a file given by aFileobject.- Parameters:
array- a big array whose elements will be written tofilename.offset- the index of the first element ofarrayto be written.length- the number of elements ofarrayto be written.file- a file.- Throws:
IOException
-
storeFloats
public static void storeFloats(float[][] array, long offset, long length, CharSequence filename) throws 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 ofarrayto be written.length- the number of elements ofarrayto be written.filename- a filename.- Throws:
IOException
-
storeFloats
Stores an array to a file given by aFileobject.- Parameters:
array- an array whose elements will be written tofilename.file- a file.- Throws:
IOException
-
storeFloats
Stores 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:
IOException
-
storeFloats
Stores the element returned by an iterator to a given data output.- Parameters:
i- an iterator whose output will be written todataOutput.dataOutput- a filename.- Throws:
IOException
-
storeFloats
Stores the element returned by an iterator to a file given by aFileobject.- Parameters:
i- an iterator whose output will be written tofilename.file- a file.- Throws:
IOException
-
storeFloats
Stores 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:
IOException
-
asFloatIterator
Wraps the given data input stream into an iterator.- Parameters:
dataInput- a data input.
-
asFloatIterator
Wraps a file given by aFileobject into an iterator.- Parameters:
file- a file.- Throws:
IOException
-
asFloatIterator
Wraps a file given by a pathname into an iterator.- Parameters:
filename- a filename.- Throws:
IOException
-
asFloatIterable
Wraps a file given by aFileobject into an iterable object.- Parameters:
file- a file.
-
asFloatIterable
Wraps a file given by a pathname into an iterable object.- Parameters:
filename- a filename.
-