/** Loads elements from a file given by a {@link File} object, storing them in a given array. * * @param file a file. * @param array an array which will be filled with data from the specified file. * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short). */ public static int loadBooleans(final File file, final boolean[] array) throws IOException { return loadBooleans(file, array, 0, array.length); } /** Loads elements from a file given by a filename, storing them in a given array.
/** Loads elements from a file given by a filename, storing them in a given array. * * @param filename a filename. * @param array an array which will be filled with data from the specified file. * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short). */ public static int loadBooleans(final CharSequence filename, final boolean[] array) throws IOException { return loadBooleans(filename, array, 0, array.length); } /** Stores an array fragment to a given print stream.
/** Loads elements from a given buffered reader, storing them in a given array. * * @param reader a buffered reader. * @param array an array which will be filled with data from {@code reader}. * @return the number of elements actually read from {@code reader} (it might be less than the array length if {@code reader} ends). */ public static int loadBooleans(final BufferedReader reader, final boolean[] array) throws IOException { return loadBooleans(reader, array, 0, array.length); } /** Loads elements from a file given by a {@link File} object, storing them in a given array fragment.
/** Loads elements from a file given by a filename, storing them in a given array fragment. * * @param filename a filename. * @param array an array which will be filled with data from the specified file. * @param offset the index of the first element of {@code array} to be filled. * @param length the number of elements of {@code array} to be filled. * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short). */ public static int loadBooleans(final CharSequence filename, final boolean[] array, final int offset, final int length) throws IOException { return loadBooleans(new File(filename.toString()), array, offset, length); } /** Loads elements from a file given by a {@link File} object, storing them in a given array.
/** Loads elements from a file given by a filename, storing them in a given big-array fragment. * * @param filename a filename. * @param array a big array which will be filled with data from the specified file. * @param offset the index of the first element of {@code array} to be filled. * @param length the number of elements of {@code array} to be filled. * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short). */ public static long loadBooleans(final CharSequence filename, final boolean[][] array, final long offset, final long length) throws IOException { return loadBooleans(new File(filename.toString()), array, offset, length); } /** Loads elements from a file given by a {@link File} object, storing them in a given array.
/** Loads elements from a file given by a {@link File} object, storing them in a given array. * * @param file a file. * @param array a big array which will be filled with data from the specified file. * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short). */ public static long loadBooleans(final File file, final boolean[][] array) throws IOException { return loadBooleans(file, array, 0, it.unimi.dsi.fastutil.booleans.BooleanBigArrays.length(array)); } /** Loads elements from a file given by a filename, storing them in a given array.
/** Loads elements from a file given by a {@link File} object, storing them in a given array fragment. * * @param file a file. * @param array an array which will be filled with data from the specified file. * @param offset the index of the first element of {@code array} to be filled. * @param length the number of elements of {@code array} to be filled. * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short). */ public static int loadBooleans(final File file, final boolean[] array, final int offset, final int length) throws IOException { final BufferedReader reader = new BufferedReader(new FileReader(file)); final int result = loadBooleans(reader, array, offset, length); reader.close(); return result; } /** Loads elements from a file given by a filename, storing them in a given array fragment.
/** Loads elements from a file given by a {@link File} object, storing them in a given big-array fragment. * * @param file a file. * @param array a big array which will be filled with data from the specified file. * @param offset the index of the first element of {@code array} to be filled. * @param length the number of elements of {@code array} to be filled. * @return the number of elements actually read from the given file (it might be less than {@code length} if the file is too short). */ public static long loadBooleans(final File file, final boolean[][] array, final long offset, final long length) throws IOException { final BufferedReader reader = new BufferedReader(new FileReader(file)); final long result = loadBooleans(reader, array, offset, length); reader.close(); return result; } /** Loads elements from a file given by a filename, storing them in a given big-array fragment.
/** Loads elements from a given buffered reader, storing them in a given array. * * @param reader a buffered reader. * @param array a big array which will be filled with data from {@code reader}. * @return the number of elements actually read from {@code reader} (it might be less than the array length if {@code reader} ends). */ public static long loadBooleans(final BufferedReader reader, final boolean[][] array) throws IOException { return loadBooleans(reader, array, 0, it.unimi.dsi.fastutil.booleans.BooleanBigArrays.length(array)); } /** Loads elements from a file given by a {@link File} object, storing them in a given big-array fragment.
/** Loads elements from a file given by a filename, storing them in a given array. * * @param filename a filename. * @param array a big array which will be filled with data from the specified file. * @return the number of elements actually read from the given file (it might be less than the array length if the file is too short). */ public static long loadBooleans(final CharSequence filename, final boolean[][] array) throws IOException { return loadBooleans(filename, array, 0, it.unimi.dsi.fastutil.booleans.BooleanBigArrays.length(array)); } /** Stores a big-array fragment to a given print stream.