public GSSHeader(InputStream is) throws IOException, GSSException {
  int tag=is.read();
  if (tag != TOKEN_ID)   throw new GSSException(GSSException.DEFECTIVE_TOKEN,-1,"GSSHeader did not find the right tag");
  int length=getLength(is);
  DerValue temp=new DerValue(is);
  mechOidBytes=temp.toByteArray();
  mechOid=temp.getOID();
  mechTokenLength=length - mechOidBytes.length;
}

public GSSHeader ( InputStream is ) throws IOException , GSSException { int tag = is . read ( ) ; if ( tag != TOKEN_ID ) throw new GSSException ( GSSException . DEFECTIVE_TOKEN , - 1 , "GSSHeader did not find the right tag" ) ; int length = getLength ( is ) ; DerValue temp = new DerValue ( is ) ; mechOidBytes = temp . toByteArray ( ) ; mechOid = temp . getOID ( ) ; mechTokenLength = length - mechOidBytes . length ; }
reads in a gssheader from an inputstream . typically this would be used as part of reading the complete token from an inputstream that is obtained from a socket .
