Package nbbrd.io.http.ext
Class PersistentResponse
java.lang.Object
nbbrd.io.http.ext.PersistentResponse
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpResponse
-
Field Summary
Fields inherited from interface nbbrd.io.http.HttpResponse
NO_CONTENT_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static @NonNull PersistentResponsecopyOf(@NonNull HttpResponse response) @NonNull InputStreamgetBody()longMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nbbrd.io.http.HttpResponse
asDisconnectingInputStream, getBodyAsReader, getBodyAsString, getContentType, getHeaders
-
Constructor Details
-
PersistentResponse
public PersistentResponse()
-
-
Method Details
-
copyOf
@NonNull public static @NonNull PersistentResponse copyOf(@NonNull @NonNull HttpResponse response) throws IOException - Throws:
IOException
-
getContentLength
public long getContentLength()- Specified by:
getContentLengthin interfaceHttpResponse
-
getBody
- Specified by:
getBodyin interfaceHttpResponse
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-