私は次のような方法を持っています
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);
}
を に変換しinputStream
たいのzipInputStream
ですが、その方法は何ですか?
- 上記の方法は正しくなく、「Not a Zip Format」として例外をスローします
Java Streams を私に変換するのは本当に混乱し、私はそれらを正しくしません