| 11 | import java.util.Map; |
| 12 | |
| 13 | public class ResponseUtils implements Connection.Response { |
| 14 | private String message=""; //返回信息 |
| 15 | |
| 16 | public void setMessage(String message) { |
| 17 | this.message = message; |
| 18 | } |
| 19 | |
| 20 | @Override |
| 21 | public int statusCode() { |
| 22 | return 0; |
| 23 | } |
| 24 | |
| 25 | @Override |
| 26 | public String statusMessage() { |
| 27 | return null; |
| 28 | } |
| 29 | |
| 30 | @Override |
| 31 | public String charset() { |
| 32 | return null; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public Connection.Response charset(String s) { |
| 37 | return null; |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public String contentType() { |
| 42 | return null; |
| 43 | } |
| 44 | |
| 45 | @Override |
| 46 | public Document parse() throws IOException { |
| 47 | return null; |
| 48 | } |
| 49 | |
| 50 | @Override |
| 51 | public String body() { |
| 52 | return this.message; |
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | public byte[] bodyAsBytes() { |
| 57 | return this.message.getBytes(StandardCharsets.UTF_8); |
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public Connection.Response bufferUp() { |
| 62 | return null; |
| 63 | } |
| 64 | |
| 65 | @Override |
| 66 | public BufferedInputStream bodyStream() { |
| 67 | return null; |
| 68 | } |
| 69 | |
| 70 | @Override |
nothing calls this directly
no outgoing calls
no test coverage detected