public void readContent() throws IOException {
  if (offset + length > buffer.length) {
    throw new ASN1Exception("Unexpected end of encoding");
  }
  if (in == null) {
    offset+=length;
  }
 else {
    int bytesRead=in.read(buffer,offset,length);
    if (bytesRead != length) {
      int c=bytesRead;
      do {
        if (c < 1 || bytesRead > length) {
          throw new ASN1Exception("Failed to read encoded content");
        }
        c=in.read(buffer,offset + bytesRead,length - bytesRead);
        bytesRead+=c;
      }
 while (bytesRead != length);
    }
    offset+=length;
  }
}

public void readContent ( ) throws IOException { if ( offset + length > buffer . length ) { throw new ASN1Exception ( "Unexpected end of encoding" ) ; } if ( in == null ) { offset += length ; } else { int bytesRead = in . read ( buffer , offset , length ) ; if ( bytesRead != length ) { int c = bytesRead ; do { if ( c < 1 || bytesRead > length ) { throw new ASN1Exception ( "Failed to read encoded content" ) ; } c = in . read ( buffer , offset + bytesRead , length - bytesRead ) ; bytesRead += c ; } while ( bytesRead != length ) ; } offset += length ; } }
reads the next encoded content from the encoded input stream . the method must be used for reading a primitive encoded content .
