GzipCompressingEntity.java (httpcomponents-client-4.5.6-src) | : | GzipCompressingEntity.java (httpcomponents-client-4.5.7-src) | ||
---|---|---|---|---|
skipping to change at line 104 | skipping to change at line 104 | |||
// force content chunking | // force content chunking | |||
return true; | return true; | |||
} | } | |||
@Override | @Override | |||
public InputStream getContent() throws IOException { | public InputStream getContent() throws IOException { | |||
throw new UnsupportedOperationException(); | throw new UnsupportedOperationException(); | |||
} | } | |||
@Override | @Override | |||
public void writeTo(final OutputStream outstream) throws IOException { | public void writeTo(final OutputStream outStream) throws IOException { | |||
Args.notNull(outstream, "Output stream"); | Args.notNull(outStream, "Output stream"); | |||
final GZIPOutputStream gzip = new GZIPOutputStream(outstream); | final GZIPOutputStream gzip = new GZIPOutputStream(outStream); | |||
wrappedEntity.writeTo(gzip); | wrappedEntity.writeTo(gzip); | |||
// Only close output stream if the wrapped entity has been | // Only close output stream if the wrapped entity has been | |||
// successfully written out | // successfully written out | |||
gzip.close(); | gzip.close(); | |||
} | } | |||
} | } | |||
End of changes. 1 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |