Here you can find the source of getInputstream(File compressedFile)
Parameter | Description |
---|---|
compressedFile | The compressed file to get the InputStream for |
public static InputStream getInputstream(File compressedFile)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.util.zip.GZIPInputStream; public class Main { /**//w w w . j a v a2s. c o m * Gets the compressed input stream for an image * * @param compressedFile The compressed file to get the {@link InputStream} for * @return the {@link InputStream} for the passed file */ public static InputStream getInputstream(File compressedFile) { try { return new GZIPInputStream(new FileInputStream(compressedFile)); } catch (Exception e) { e.printStackTrace(); } return null; } }