List of usage examples for java.io EOFException initCause
public synchronized Throwable initCause(Throwable cause)
From source file:org.apache.hadoop.hbase.codec.BaseDecoder.java
private void rethrowEofException(IOException ioEx) throws IOException { boolean isEof = false; try {/*from ww w .java 2 s . c o m*/ isEof = this.in.available() == 0; } catch (Throwable t) { LOG.trace("Error getting available for error message - ignoring", t); } if (!isEof) throw ioEx; LOG.error("Partial cell read caused by EOF: " + ioEx); EOFException eofEx = new EOFException("Partial cell read"); eofEx.initCause(ioEx); throw eofEx; }
From source file:org.apache.hadoop.hbase.regionserver.wal.BinaryCompatibleBaseDecoder.java
private void rethrowEofException(IOException ioEx) throws IOException { boolean isEof = false; try {/*from ww w . ja v a2s . c o m*/ isEof = this.in.available() == 0; } catch (Throwable t) { LOG.trace("Error getting available for error message - ignoring", t); } if (!isEof) throw ioEx; if (LOG.isTraceEnabled()) { LOG.trace("Partial cell read caused by EOF", ioEx); } EOFException eofEx = new EOFException("Partial cell read"); eofEx.initCause(ioEx); throw eofEx; }