public int read() throws IOException { if ( eof ) return -1; final int nextByte = super.read(); if ( nextByte == separator || nextByte == -1 ) { eof = true; return -1; } return nextByte; }
public int read() throws IOException { if ( eod ) return -1; final int nextByte = super.read(); if ( nextByte == separator ) { eod = true; return -1; } if ( nextByte == -1 ) { eof = eod = true; return -1; } return nextByte; }
public int read() throws IOException { if ( eof ) return -1; final int nextByte = super.read(); if ( nextByte == separator || nextByte == -1 ) { eof = true; return -1; } return nextByte; }
public int read() throws IOException { if ( eod ) return -1; final int nextByte = super.read(); if ( nextByte == separator ) { eod = true; return -1; } if ( nextByte == -1 ) { eof = eod = true; return -1; } return nextByte; }
@Override public DataSet next() { try { inputStream.read(length, 0, 4); } catch (IOException e) { LOG.error("Unable to read length from stream.", e); final byte[] elements = content.elements(); try { inputStream.read(elements); } catch (IOException e) { LOG.error("Unable to read content from stream at index " + index, e);
cacheDataIn.read( buffer, 0, ( cacheDataLength[ k ] + 7 ) / 8 ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, (int)( ( cacheDataLength[ k ] + 7 ) / 8 ) ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, ( cacheDataLength[ k ] + 7 ) / 8 ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, (int)( ( cacheDataLength[ k ] + 7 ) / 8 ) ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, (int)( ( cacheDataLength[ k ] + 7 ) / 8 ) ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, ( cacheDataLength[ k ] + 7 ) / 8 ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, (int)( ( cacheDataLength[ k ] + 7 ) / 8 ) ); obs.write( buffer, cacheDataLength[ k ] );
cacheDataIn.read( buffer, 0, ( cacheDataLength[ k ] + 7 ) / 8 ); obs.write( buffer, cacheDataLength[ k ] );