(Response response, Type type)
| 23 | public class DefaultDecoder extends StringDecoder { |
| 24 | |
| 25 | @Override |
| 26 | public Object decode(Response response, Type type) throws IOException { |
| 27 | if (response.status() == 404 || response.status() == 204) return Util.emptyValueOf(type); |
| 28 | if (response.body() == null) return null; |
| 29 | if (byte[].class.equals(type)) { |
| 30 | return Util.toByteArray(response.body().asInputStream()); |
| 31 | } |
| 32 | return super.decode(response, type); |
| 33 | } |
| 34 | } |
nothing calls this directly
no test coverage detected