Package io.freefair.spring.okhttp
Class OkHttpResponseBodyResource
java.lang.Object
org.springframework.core.io.AbstractResource
io.freefair.spring.okhttp.OkHttpResponseBodyResource
- All Implemented Interfaces:
Closeable,AutoCloseable,InputStreamSource,Resource
- Direct Known Subclasses:
OkHttpResponseResource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longbooleanexists()byte[]getContentAsString(Charset charset) booleanisOpen()booleanMethods inherited from class org.springframework.core.io.AbstractResource
createRelative, equals, getFile, getFileForLastModifiedCheck, getFilename, getURI, getURL, hashCode, isFile, lastModified, readableChannel, toString
-
Constructor Details
-
OkHttpResponseBodyResource
-
-
Method Details
-
getContentAsByteArray
- Specified by:
getContentAsByteArrayin interfaceResource- Throws:
IOException
-
getContentAsString
- Specified by:
getContentAsStringin interfaceResource- Throws:
IOException
-
getDescription
- Specified by:
getDescriptionin interfaceResource
-
getInputStream
- Specified by:
getInputStreamin interfaceInputStreamSource- Throws:
FileNotFoundException
-
contentLength
- Specified by:
contentLengthin interfaceResource- Overrides:
contentLengthin classAbstractResource- Throws:
FileNotFoundException
-
exists
- Specified by:
existsin interfaceResource- Overrides:
existsin classAbstractResource
-
isOpen
- Specified by:
isOpenin interfaceResource- Overrides:
isOpenin classAbstractResource
-
isReadable
- Specified by:
isReadablein interfaceResource- Overrides:
isReadablein classAbstractResource
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getResponseBody
-