Package com.inrupt.client
Class Response.BodyHandlers
- java.lang.Object
-
- com.inrupt.client.Response.BodyHandlers
-
public static final class Response.BodyHandlers extends Object
Convenience methods for creating commonResponse.BodyHandler
objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Response.BodyHandler<Void>
discarding()
Creates a response handler that discards the body.static Response.BodyHandler<byte[]>
ofByteArray()
Creates abyte[]
response handler.static Response.BodyHandler<InputStream>
ofInputStream()
Creates anInputStream
-based response handler.static Response.BodyHandler<String>
ofString()
Creates aString
-based response handler.
-
-
-
Method Detail
-
ofByteArray
public static Response.BodyHandler<byte[]> ofByteArray()
Creates abyte[]
response handler.- Returns:
- the body handler
-
ofString
public static Response.BodyHandler<String> ofString()
Creates aString
-based response handler.- Returns:
- the body handler
-
ofInputStream
public static Response.BodyHandler<InputStream> ofInputStream()
Creates anInputStream
-based response handler.- Returns:
- the body handler
-
discarding
public static Response.BodyHandler<Void> discarding()
Creates a response handler that discards the body.- Returns:
- the body handler
-
-