Method Summary |
|
public static void | closeQuitely(Closeable c) |
public static void | closeStreams(List<Closeable> streams) |
public static long | copy(InputStream in, OutputStream out) Copies the content of the InputStream to the OutputStream. |
final public static long | estimateRecords(File f) |
final public static long | estimateRecords(File f, long sampleLines) Tries to estimate the number of records in the given file. |
public static long | getCharacterLength(File source, String encoding) Returns the number of characters according to the
encoding in the specified file. |
final public static String | getLineEnding(Reader in) Try to detect the line ending used by the passed Reader.
This will advance the reader until a line ending is found.
The reader will not be closed
Parameters: in - the "file" to test the sequence of characters used as the line ending (e.g. |
public static Collection<String> | getLines(BufferedReader in) Read the lines of the given Reader into a Collection. |
public static byte[] | readBytes(InputStream in) Read the content of the InputStream into a ByteArray. |
public static String | readCharacters(Reader in) Read the content of the Reader into a String. |
final public static int | readLines(BufferedReader in, StringBuilder buffer, int numLines, String lineEnd) Read the contents of the Reader into the provided StringBuilder.
Max. |