@Override public void close() throws IOException { AbstractSeekableLineReader.this.close(); //in.close(); } }
public void skipLine() throws IOException { readLine(); }
public void seek(long offset) throws IOException { seekWithMaxRead(offset, false, -1); }
public void seekWithMaxRead(long offset, boolean gzip, int maxLength) throws IOException { if (closed) { throw new IOException("Seek after close()"); } br = null; try { is = doSeekLoad(offset, maxLength); if (bufferFully && (maxLength > 0)) { byte[] buffer = new byte[maxLength]; ByteStreams.readFully(is, buffer); doClose(); is = new ByteArrayInputStream(buffer); } if (gzip) { is = new GZIPMembersInputStream(is, blockSize); } } catch (IOException io) { doClose(); throw io; } }
public String readLine() throws IOException { if (is == null) { seek(0); } if (br == null) { InputStreamReader isr = new InputStreamReader(is, UTF8); br = new BufferedReader(isr, blockSize); } return br.readLine(); }
public final void close() throws IOException { if (closed) { return; } doClose(); if (br != null) { br.close(); br = null; } else if (is != null) { is.close(); } br = null; is = null; closed = true; }
public void seekWithMaxRead(long offset, boolean gzip, int maxLength) throws IOException { if (closed) { throw new IOException("Seek after close()"); } br = null; try { is = doSeekLoad(offset, maxLength); if (bufferFully && (maxLength > 0)) { byte[] buffer = new byte[maxLength]; ByteStreams.readFully(is, buffer); doClose(); is = new ByteArrayInputStream(buffer); } if (gzip) { is = new GZIPMembersInputStream(is, blockSize); } } catch (IOException io) { doClose(); throw io; } }
public String readLine() throws IOException { if (is == null) { seek(0); } if (br == null) { InputStreamReader isr = new InputStreamReader(is, UTF8); br = new BufferedReader(isr, blockSize); } return br.readLine(); }
public final void close() throws IOException { if (closed) { return; } doClose(); if (br != null) { br.close(); br = null; } else if (is != null) { is.close(); } br = null; is = null; closed = true; }
public void seekWithMaxRead(long offset, boolean gzip, int maxLength) throws IOException { if (closed) { throw new IOException("Seek after close()"); } br = null; try { is = doSeekLoad(offset, maxLength); if (bufferFully && (maxLength > 0)) { byte[] buffer = new byte[maxLength]; ByteStreams.readFully(is, buffer); doClose(); is = new ByteArrayInputStream(buffer); } if (gzip) { is = new GZIPMembersInputStream(is, blockSize); } } catch (IOException io) { doClose(); throw io; } }
@Override public void close() throws IOException { AbstractSeekableLineReader.this.close(); //in.close(); } }
public String readLine() throws IOException { if (is == null) { seek(0); } if (br == null) { InputStreamReader isr = new InputStreamReader(is, UTF8); br = new BufferedReader(isr, blockSize); } return br.readLine(); }
public void seek(long offset) throws IOException { seekWithMaxRead(offset, false, -1); }
public void skipLine() throws IOException { readLine(); }
public final void close() throws IOException { if (closed) { return; } doClose(); if (br != null) { br.close(); br = null; } else if (is != null) { is.close(); } br = null; is = null; closed = true; }
@Override public void finalize() { if (!closed) { try { close(); } catch (IOException e) { } } } }
public void seek(long offset) throws IOException { seekWithMaxRead(offset, false, -1); }
public void skipLine() throws IOException { readLine(); }
@Override public void close() throws IOException { AbstractSeekableLineReader.this.close(); //in.close(); } }
@Override public void finalize() { if (!closed) { try { close(); } catch (IOException e) { } } } }