MCPcopy Index your code
hub / github.com/apache/commons-io / readFully

Method readFully

src/main/java/org/apache/commons/io/IOUtils.java:2973–2979  ·  view source on GitHub ↗

Reads the requested number of characters or fail if there are not enough left. This allows for the possibility that Reader#read(char[], int, int) may not read as many characters as requested (most likely because of reaching EOF). @param input where to read input from @param buffer desti

(final Reader input, final char[] buffer, final int offset, final int length)

Source from the content-addressed store, hash-verified

2971 * @since 2.2
2972 */
2973 public static void readFully(final Reader input, final char[] buffer, final int offset, final int length)
2974 throws IOException {
2975 final int actual = read(input, buffer, offset, length);
2976 if (actual != length) {
2977 throw new EOFException("Length to read: " + length + " actual: " + actual);
2978 }
2979 }
2980
2981 /**
2982 * Reads the requested number of characters or fail if there are not enough left.

Calls 1

readMethod · 0.95