MultiReader(Iterator<? extends InputSupplier<? extends Reader>> readers) throws IOException { this.it = readers; advance(); }
MultiReader(Iterator<? extends InputSupplier<? extends Reader>> readers) throws IOException { this.it = readers; advance(); }
MultiReader(Iterator<? extends InputSupplier<? extends Reader>> readers) throws IOException { this.it = readers; advance(); }
@Override public int read(char cbuf[], int off, int len) throws IOException { if (current == null) { return -1; } int result = current.read(cbuf, off, len); if (result == -1) { advance(); return read(cbuf, off, len); } return result; }
@Override public long skip(long n) throws IOException { Preconditions.checkArgument(n >= 0, "n is negative"); if (n > 0) { while (current != null) { long result = current.skip(n); if (result > 0) { return result; } advance(); } } return 0; }
@Override public int read(char cbuf[], int off, int len) throws IOException { if (current == null) { return -1; } int result = current.read(cbuf, off, len); if (result == -1) { advance(); return read(cbuf, off, len); } return result; }
@Override public int read(char cbuf[], int off, int len) throws IOException { if (current == null) { return -1; } int result = current.read(cbuf, off, len); if (result == -1) { advance(); return read(cbuf, off, len); } return result; }
@Override public long skip(long n) throws IOException { Preconditions.checkArgument(n >= 0, "n is negative"); if (n > 0) { while (current != null) { long result = current.skip(n); if (result > 0) { return result; } advance(); } } return 0; }
@Override public long skip(long n) throws IOException { Preconditions.checkArgument(n >= 0, "n is negative"); if (n > 0) { while (current != null) { long result = current.skip(n); if (result > 0) { return result; } advance(); } } return 0; }