public static DynamicSchema parseFrom(InputStream schemaDescIn) throws DescriptorValidationException, IOException {
  try {
    int len;
    byte[] buf=new byte[4096];
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    while ((len=schemaDescIn.read(buf)) > 0)     baos.write(buf,0,len);
    return parseFrom(baos.toByteArray());
  }
  finally {
    schemaDescIn.close();
  }
}

public static DynamicSchema parseFrom ( InputStream schemaDescIn ) throws DescriptorValidationException , IOException { try { int len ; byte [ ] buf = new byte [ 4096 ] ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; while ( ( len = schemaDescIn . read ( buf ) ) > 0 ) baos . write ( buf , 0 , len ) ; return parseFrom ( baos . toByteArray ( ) ) ; } finally { schemaDescIn . close ( ) ; } }
parses a serialized schema descriptor ( from input stream ; closes the stream )
