public void decodeBuffer ( InputStream aStream , OutputStream bStream ) throws IOException { int i ; int totalBytes = 0 ; PushbackInputStream ps = new PushbackInputStream ( aStream ) ; decodeBufferPrefix ( ps , bStream ) ; while ( true ) { int length ; try { length = decodeLinePrefix ( ps , bStream ) ; for ( i = 0 ; ( i + bytesPerAtom ( ) ) < length ; i += bytesPerAtom ( ) ) { decodeAtom ( ps , bStream , bytesPerAtom ( ) ) ; totalBytes += bytesPerAtom ( ) ; } if ( ( i + bytesPerAtom ( ) ) == length ) { decodeAtom ( ps , bStream , bytesPerAtom ( ) ) ; totalBytes += bytesPerAtom ( ) ; } else { decodeAtom ( ps , bStream , length - i ) ; totalBytes += ( length - i ) ; } decodeLineSuffix ( ps , bStream ) ; } catch ( CEStreamExhausted e ) { break ; } } decodeBufferSuffix ( ps , bStream ) ; }
Decode the text from the InputStream and write the decoded octets to the OutputStream . This method runs until the stream is exhausted .