diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java index 69ed1a412..4636bdaf3 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/FileResource.java @@ -109,4 +109,12 @@ public class FileResource extends Resource { } } + @Override + public String toString() { + return "[" + + "file=" + getFile() + "," + + "len=" + length() + + ']'; + } + } diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java index 8a23e3916..a632f5266 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/HeapResource.java @@ -74,4 +74,12 @@ public class HeapResource extends Resource { this.arrayRef.set(null); } + @Override + public String toString() { + return "[" + + "heap," + + "len=" + length() + + ']'; + } + }