code: public static IResourceStream getResourceStream(final java.io.File file,
  		final String contentType) throws IOException
  	{
  		return new ByteArrayResourceStreamWriter()
  		{
  			private static final long serialVersionUID = 1L;
  
  			@Override
  			public String getContentType()
  			{
  				return contentType;
  			}
  
  			@Override
  			protected byte[] load() throws IOException
  			{
  				final byte[] data = Files.readBytes(file);
  				return data;
  			}
  		};
  	}
docs: Gets the resource stream from the given parameters.
  
  @param file
  the file
  @param contentType
  the content type
  @return the resource stream
  @throws IOException
  Signals that an I/O exception has occurred.