public BOMInputStream(InputStream delegate,boolean include,ByteOrderMark... boms){
  super(delegate);
  if (boms == null || boms.length == 0) {
    throw new IllegalArgumentException("No BOMs specified");
  }
  this.include=include;
  Arrays.sort(boms,ByteOrderMarkLengthComparator);
  this.boms=Arrays.asList(boms);
}

public BOMInputStream ( InputStream delegate , boolean include , ByteOrderMark ... boms ) { super ( delegate ) ; if ( boms == null || boms . length == 0 ) { throw new IllegalArgumentException ( "No BOMs specified" ) ; } this . include = include ; Arrays . sort ( boms , ByteOrderMarkLengthComparator ) ; this . boms = Arrays . asList ( boms ) ; }
constructs a new bom inputstream that detects the specified boms and optionally includes them .
