Java: Jak przekonwertować InputStream na GZIPInputStream?
Mam taką metodę
public void put(@Nonnull final InputStream inputStream, @Nonnull final String uniqueId) throws PersistenceException {
// a.) create gzip of inputStream
final GZIPInputStream zipInputStream;
try {
zipInputStream = new GZIPInputStream(inputStream);
} catch (IOException e) {
e.printStackTrace();
throw new PersistenceException("Persistence Service could not received input stream to persist for " + uniqueId);
}
Chcę przekonwertowaćinputStream
wzipInputStream
, w jaki sposób to zrobić?
konwertowanie do mnie strumieni Java jest naprawdę mylące i nie poprawiam ich