@Override public long tell() throws IOException { return in.tell(); }
@Override public long tell() throws IOException { return in.tell(); }
@Override public int available() throws IOException { long remaining = (in.length() - in.tell()); return (remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) remaining; } }
@Override public int available() throws IOException { long remaining = (in.length() - in.tell()); return (remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) remaining; } }
/** * Construct a reader for a file at the current position of the input, * without reading the header. * @param sync True to read forward to the next sync point after opening, * false to assume that the input is already at a valid sync * point. */ public static <D> DataFileReader<D> openReader(SeekableInput in, DatumReader<D> reader, Header header, boolean sync) throws IOException { DataFileReader<D> dreader = new DataFileReader<>(in, reader, header); // seek/sync to an (assumed) valid position if (sync) dreader.sync(in.tell()); else dreader.seek(in.tell()); return dreader; }
/** * Construct a reader for a file at the current position of the input, * without reading the header. * @param sync True to read forward to the next sync point after opening, * false to assume that the input is already at a valid sync * point. */ public static <D> DataFileReader<D> openReader(SeekableInput in, DatumReader<D> reader, Header header, boolean sync) throws IOException { DataFileReader<D> dreader = new DataFileReader<D>(in, reader, header); // seek/sync to an (assumed) valid position if (sync) dreader.sync(in.tell()); else dreader.seek(in.tell()); return dreader; }
@Override public long tell() throws IOException { return in.tell(); }
@Override public long tell() throws IOException { return in.tell(); }
@Override public long tell() throws IOException { return in.tell(); }
@Override public float getProgress() throws IOException { if (end == start) { return 0.0f; } else { return Math.min(1.0f, (in.tell() - start) / (float)(end - start)); } }
@Override public float getProgress() throws IOException { if (end == start) { return 0.0f; } else { return Math.min(1.0f, (in.tell() - start) / (float)(end - start)); } }
@Override public int available() throws IOException { long remaining = (in.length() - in.tell()); return (remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) remaining; } }
@Override public int available() throws IOException { long remaining = (in.length() - in.tell()); return (remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) remaining; } }
@Override public int available() throws IOException { long remaining = (in.length() - in.tell()); return (remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) remaining; } }
@Override public int available() throws IOException { long remaining = (in.length() - in.tell()); return (remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) remaining; } }