public byte [ ] readNextProtoBytes ( ) throws IOException { while ( true ) { if ( ! setupNewBlockIfNeeded ( ) ) { return null ; } int blobIndex = curBlobs_ . size ( ) - numLeftToReadThisBlock_ ; numLeftToReadThisBlock_ -- ; byte [ ] blob = curBlobs_ . get ( blobIndex ) . toByteArray ( ) ; if ( blob . length == 0 && skipEmptyRecords ) { continue ; } return blob ; } }
Return byte blob for the next proto object . null indicates end of stream ;