code: public ItemDataProvider readBibliographyFile(InputStream bibstream,
  			String filename) throws IOException {
  		BufferedInputStream bis;
  		if (bibstream instanceof BufferedInputStream) {
  			bis = (BufferedInputStream)bibstream;
  		} else {
  			bis = new BufferedInputStream(bibstream);
  		}
  		
  		//determine file format
  		FileFormat ff = determineFileFormat(bis, filename);
  		
  		//read stream
  		return readBibliographyFile(bis, ff);
  	}
docs: Reads all items from an input stream and returns a provider
  serving these items. Note that you can supply an additional file
  name to help the method to determine the exact bibliography file format.
  If you don't know the file name you can pass null, but in this case the
  method's result might try to read the input stream using the wrong
  file format (depending on the input stream's contents). Also note
  that the caller is responsible for closing the given input stream.
  @param bibstream the input stream
  @param filename the name of the input file (can be null if you don't
  know the name)
  @return the provider
  @throws IOException if the input stream could not be read