mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 02:12:54 +00:00
Router: Add gzip caches to clearCaches()
This commit is contained in:
1 parent
c807194e93
commit
7715e6484c
3 files changed
+22
No files matched your search
@@ -43,6 +43,15 @@ public class ReusableGZIPInputStream extends ResettableGZIPInputStream {
|
||||
|
||||
private ReusableGZIPInputStream() { super(); }
|
||||
|
||||
/**
|
||||
* Clear the cache.
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public static void clearCache() {
|
||||
if (_available != null)
|
||||
_available.clear();
|
||||
}
|
||||
|
||||
/*******
|
||||
public static void main(String args[]) {
|
||||
for (int i = 0; i < 2; i++)
|
||||
|
||||
@@ -75,6 +75,15 @@ public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream {
|
||||
/** pull the contents of the stream written */
|
||||
public byte[] getData() { return _buffer.toByteArray(); }
|
||||
|
||||
/**
|
||||
* Clear the cache.
|
||||
* @since 0.9.21
|
||||
*/
|
||||
public static void clearCache() {
|
||||
if (_available != null)
|
||||
_available.clear();
|
||||
}
|
||||
|
||||
/******
|
||||
public static void main(String args[]) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user