diff options
author | Jarno Elonen <elonen@iki.fi> | 2015-08-21 19:13:27 +0300 |
---|---|---|
committer | Jarno Elonen <elonen@iki.fi> | 2015-08-21 19:13:27 +0300 |
commit | 504cf71fb77ee34a9b37a632664c58f89ab1984e (patch) | |
tree | 275bbc52956a03119c3dd51e80aff09e3a3ac4d9 /core/src/main/java | |
parent | c8aca9cd463e64f46f0fb3435b53a544205af62c (diff) | |
download | nanohttpd-504cf71fb77ee34a9b37a632664c58f89ab1984e.tar.gz |
Work towards static newXXResponse()s
Diffstat (limited to 'core/src/main/java')
-rw-r--r-- | core/src/main/java/fi/iki/elonen/NanoHTTPD.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java index 32e6e87..b39efdb 100644 --- a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java +++ b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java @@ -1801,21 +1801,21 @@ public abstract class NanoHTTPD { /** * Create a response with unknown length (using HTTP 1.1 chunking). */ - public Response newChunkedResponse(IStatus status, String mimeType, InputStream data) { + public static Response newChunkedResponse(IStatus status, String mimeType, InputStream data) { return new Response(status, mimeType, data, -1); } /** * Create a response with known length. */ - public Response newFixedLengthResponse(IStatus status, String mimeType, InputStream data, long totalBytes) { + public static Response newFixedLengthResponse(IStatus status, String mimeType, InputStream data, long totalBytes) { return new Response(status, mimeType, data, totalBytes); } /** * Create a text response with known length. */ - public Response newFixedLengthResponse(IStatus status, String mimeType, String txt) { + public static Response newFixedLengthResponse(IStatus status, String mimeType, String txt) { if (txt == null) { return newFixedLengthResponse(status, mimeType, new ByteArrayInputStream(new byte[0]), 0); } else { @@ -1833,7 +1833,7 @@ public abstract class NanoHTTPD { /** * Create a text response with known length. */ - public Response newFixedLengthResponse(String msg) { + public static Response newFixedLengthResponse(String msg) { return newFixedLengthResponse(Status.OK, NanoHTTPD.MIME_HTML, msg); } |