diff options
author | Daniel Erat <derat@google.com> | 2016-01-04 21:44:58 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-01-04 21:44:58 +0000 |
commit | 48e7e363b22de734efa9ca2bdb0d02976a432918 (patch) | |
tree | c8ca3bcce72159a0fcf55a91bc2def3098d59322 | |
parent | 82426238b3f467c82bece5e894220d893b8d0765 (diff) | |
parent | 12973d7c220d261c3748e3c8051b3ef478cf5b7a (diff) | |
download | nanohttpd-48e7e363b22de734efa9ca2bdb0d02976a432918.tar.gz |
Add newFixedLengthResponse() to the NanoHTTPD class.
am: 12973d7c22
* commit '12973d7c220d261c3748e3c8051b3ef478cf5b7a':
Add newFixedLengthResponse() to the NanoHTTPD class.
-rw-r--r-- | core/src/main/java/fi/iki/elonen/NanoHTTPD.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java index ed59670..73fea3c 100644 --- a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java +++ b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java @@ -254,6 +254,15 @@ public abstract class NanoHTTPD { } /** + * Create a response with known length. + * + * TODO: Remove this implementation when updating to v2.2.0. + */ + public static Response newFixedLengthResponse(Response.Status status, String mimeType, String txt) { + return new Response(status, mimeType, txt); + } + + /** * Override this to customize the server. * <p/> * <p/> |