/external/nist-sip/java/gov/nist/javax/sip/header/ |
D | ContentLength.java | 86 protected Integer contentLength; field in ContentLength 100 this.contentLength = Integer.valueOf(length); in ContentLength() 108 return contentLength.intValue(); in getContentLength() 115 public void setContentLength(int contentLength) in setContentLength() argument 117 if (contentLength < 0) in setContentLength() 121 this.contentLength = Integer.valueOf(contentLength); in setContentLength() 133 if (contentLength == null) in encodeBody() 136 buffer.append(contentLength.toString()); in encodeBody()
|
/external/apache-http/src/org/apache/http/impl/io/ |
D | ContentLengthInputStream.java | 83 private long contentLength; field in ContentLengthInputStream 103 public ContentLengthInputStream(final SessionInputBuffer in, long contentLength) { in ContentLengthInputStream() argument 108 if (contentLength < 0) { in ContentLengthInputStream() 112 this.contentLength = contentLength; in ContentLengthInputStream() 148 if (pos >= contentLength) { in read() 172 if (pos >= contentLength) { in read() 176 if (pos + len > contentLength) { in read() 177 len = (int) (contentLength - pos); in read() 211 long remaining = Math.min(n, this.contentLength - this.pos); in skip()
|
D | ContentLengthOutputStream.java | 64 private final long contentLength; field in ContentLengthOutputStream 81 public ContentLengthOutputStream(final SessionOutputBuffer out, long contentLength) { in ContentLengthOutputStream() argument 86 if (contentLength < 0) { in ContentLengthOutputStream() 90 this.contentLength = contentLength; in ContentLengthOutputStream() 113 if (this.total < this.contentLength) { in write() 114 long max = this.contentLength - this.total; in write() 131 if (this.total < this.contentLength) { in write()
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/ |
D | ResponseBody.java | 40 public abstract long contentLength() throws IOException; in contentLength() method in ResponseBody 49 long contentLength = contentLength(); in bytes() local 50 if (contentLength > Integer.MAX_VALUE) { in bytes() 51 throw new IOException("Cannot buffer entire body for content length: " + contentLength); in bytes() 61 if (contentLength != -1 && contentLength != bytes.length) { in bytes() 120 final MediaType contentType, final long contentLength, final BufferedSource content) { in create() argument 127 @Override public long contentLength() { in create() method in ResponseBody 128 return contentLength; in create()
|
D | MultipartBuilder.java | 201 private long contentLength = -1L; field in MultipartBuilder.MultipartRequestBody 217 @Override public long contentLength() throws IOException { in contentLength() method in MultipartBuilder.MultipartRequestBody 218 long result = contentLength; in contentLength() 220 return contentLength = writeOrCountBytes(null, true); in contentLength() 261 long contentLength = body.contentLength(); in writeOrCountBytes() local 262 if (contentLength != -1) { in writeOrCountBytes() 264 .writeDecimalLong(contentLength) in writeOrCountBytes() 275 byteCount += contentLength; in writeOrCountBytes()
|
D | RequestBody.java | 35 public long contentLength() throws IOException { in contentLength() method in RequestBody 66 @Override public long contentLength() throws IOException { in create() method in RequestBody 91 @Override public long contentLength() { 110 @Override public long contentLength() {
|
D | Cache.java | 661 String contentLength = responseHeaders.get("Content-Length"); in response() local 673 .body(new CacheResponseBody(snapshot, contentType, contentLength)) in response() 696 private final String contentLength; field in CacheResponseBody 699 String contentType, String contentLength) { in CacheResponseBody() argument 702 this.contentLength = contentLength; in CacheResponseBody() 717 @Override public long contentLength() { in contentLength() method in CacheResponseBody 719 return contentLength != null ? Long.parseLong(contentLength) : -1; in contentLength()
|
D | Call.java | 262 long contentLength = body.contentLength(); in getResponse() local 263 if (contentLength != -1) { in getResponse() 264 requestBuilder.header("Content-Length", Long.toString(contentLength)); in getResponse()
|
/external/sl4a/InterpreterForAndroid/src/com/googlecode/android_scripting/ |
D | UrlDownloaderTask.java | 114 int contentLength = progress[1]; in onProgressUpdate() local 115 if (contentLength == -1) { in onProgressUpdate() 118 mDialog.setMax(contentLength); in onProgressUpdate() 153 int contentLength = connection.getContentLength(); in download() local 155 if (mFile.exists() && contentLength == mFile.length()) { in download() 166 publishProgress(0, contentLength); in download() 169 if (bytesCopied != contentLength && contentLength != -1) { in download() 170 throw new IOException("Download incomplete: " + bytesCopied + " != " + contentLength); in download()
|
/external/nist-sip/java/gov/nist/javax/sip/parser/ |
D | PipelinedMsgParser.java | 294 int contentLength = 0; in run() local 296 contentLength = cl.getContentLength(); in run() 298 contentLength = 0; in run() 302 Debug.println("contentLength " + contentLength); in run() 305 if (contentLength == 0) { in run() 308 || contentLength < this.sizeCounter) { in run() 309 byte[] message_body = new byte[contentLength]; in run() 311 while (nread < contentLength) { in run() 322 nread, contentLength - nread); in run()
|
D | MaxForwardsParser.java | 43 public MaxForwardsParser(String contentLength) { in MaxForwardsParser() argument 44 super(contentLength); in MaxForwardsParser() 55 MaxForwards contentLength = new MaxForwards(); in parse() local 58 contentLength.setMaxForwards(Integer.parseInt(number)); in parse() 61 return contentLength; in parse()
|
D | ContentLengthParser.java | 44 public ContentLengthParser(String contentLength) { in ContentLengthParser() argument 45 super(contentLength); in ContentLengthParser() 56 ContentLength contentLength = new ContentLength(); in parse() local 59 contentLength.setContentLength(Integer.parseInt(number)); in parse() 62 return contentLength; in parse()
|
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/ |
D | Progress.java | 41 @Override public void update(long bytesRead, long contentLength, boolean done) { in run() 43 System.out.println(contentLength); in run() 45 System.out.format("%d%% done\n", (100 * bytesRead) / contentLength); in run() 83 @Override public long contentLength() throws IOException { in contentLength() method in Progress.ProgressResponseBody 84 return responseBody.contentLength(); in contentLength() 101 progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); in source() 109 void update(long bytesRead, long contentLength, boolean done); in update() argument
|
/external/nanohttpd/core/src/test/java/fi/iki/elonen/ |
D | HttpPostRequestTest.java | 80 …int contentLength = size + contentLengthHeaderValueSize + HttpPostRequestTest.CONTENT_LENGTH.lengt… in preparePostWithMultipartForm() local 81 …String input = header + HttpPostRequestTest.CONTENT_LENGTH + (contentLength + 5) + "\r\n\r\n" + co… in preparePostWithMultipartForm() 125 …int contentLength = size + contentLengthHeaderValueSize + HttpPostRequestTest.CONTENT_LENGTH.lengt… in testPostWithMultipleMultipartFormFields() local 126 …String input = header + HttpPostRequestTest.CONTENT_LENGTH + (contentLength + 4) + "\r\n\r\n" + co… in testPostWithMultipleMultipartFormFields() 144 …int contentLength = size + contentLengthHeaderValueSize + HttpPostRequestTest.CONTENT_LENGTH.lengt… in testPostWithMultipleMultipartFormFieldsWhereContentTypeWasSeparatedByComma() local 145 …String input = header + HttpPostRequestTest.CONTENT_LENGTH + (contentLength + 4) + "\r\n\r\n" + co… in testPostWithMultipleMultipartFormFieldsWhereContentTypeWasSeparatedByComma() 162 …int contentLength = size + contentLengthHeaderValueSize + HttpPostRequestTest.CONTENT_LENGTH.lengt… in testSimplePostWithSingleMultipartFormField() local 163 …String input = header + HttpPostRequestTest.CONTENT_LENGTH + (contentLength + 4) + "\r\n\r\n" + co… in testSimplePostWithSingleMultipartFormField() 176 …int contentLength = size + contentLengthHeaderValueSize + HttpPostRequestTest.CONTENT_LENGTH.lengt… in testSimpleRawPostData() local 177 …String input = header + HttpPostRequestTest.CONTENT_LENGTH + (contentLength + 4) + "\r\n\r\n" + co… in testSimpleRawPostData()
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
D | MultipartBuilderTest.java | 49 assertEquals(53, requestBody.contentLength()); in singlePart() 50 assertEquals(buffer.size(), requestBody.contentLength()); in singlePart() 80 assertEquals(112, requestBody.contentLength()); in threeParts() 81 assertEquals(buffer.size(), requestBody.contentLength()); in threeParts() 137 assertEquals(568, requestBody.contentLength()); in fieldAndTwoFiles() 138 assertEquals(buffer.size(), requestBody.contentLength()); in fieldAndTwoFiles() 223 assertEquals(-1, requestBody.contentLength()); in streamingPartHasNoLength()
|
D | RequestTest.java | 38 assertEquals(3, body.contentLength()); in string() 47 assertEquals(3, body.contentLength()); in stringWithDefaultCharsetAdded() 55 assertEquals(2, body.contentLength()); in stringWithNonDefaultCharsetSpecified() 63 assertEquals(3, body.contentLength()); in byteArray() 72 assertEquals(3, body.contentLength()); in byteArrayRange() 86 assertEquals(3, body.contentLength()); in file() 106 assertEquals(0L, delete.body().contentLength()); in crudVerbs()
|
D | FormEncodingBuilderTest.java | 35 assertEquals(expected.length(), formEncoding.contentLength()); in urlEncoding() 61 assertEquals(expected.length(), formEncoding.contentLength()); in encodedPair() 76 assertEquals(expected.length(), formEncoding.contentLength()); in encodeMultiplePairs() 87 assertEquals(expected.length(), formEncoding.contentLength()); in buildEmptyForm()
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/ |
D | Http1xStream.java | 87 @Override public Sink createRequestBody(Request request, long contentLength) throws IOException { in createRequestBody() argument 93 if (contentLength != -1) { in createRequestBody() 95 return newFixedLengthSink(contentLength); in createRequestBody() 144 long contentLength = OkHeaders.contentLength(response); in getTransferStream() local 145 if (contentLength != -1) { in getTransferStream() 146 return newFixedLengthSource(contentLength); in getTransferStream() 223 public Sink newFixedLengthSink(long contentLength) { in newFixedLengthSink() argument 226 return new FixedLengthSink(contentLength); in newFixedLengthSink()
|
D | HttpEngine.java | 98 @Override public long contentLength() { 232 long contentLength = OkHeaders.contentLength(request); in sendRequest() local 234 if (contentLength > Integer.MAX_VALUE) { in sendRequest() 239 if (contentLength != -1) { in sendRequest() 242 requestBodyOut = new RetryableSink((int) contentLength); in sendRequest() 251 requestBodyOut = httpStream.createRequestBody(networkRequest, contentLength); in sendRequest() 504 if (OkHeaders.contentLength(response) != -1 in hasBody() 586 if (OkHeaders.contentLength(networkRequest) == -1 in readResponse() 588 long contentLength = ((RetryableSink) requestBodyOut).contentLength(); in readResponse() local 590 .header("Content-Length", Long.toString(contentLength)) in readResponse() [all …]
|
D | RealResponseBody.java | 37 @Override public long contentLength() { in contentLength() method in RealResponseBody 38 return OkHeaders.contentLength(headers); in contentLength()
|
D | OkHeaders.java | 64 public static long contentLength(Request request) { in contentLength() method in OkHeaders 65 return contentLength(request.headers()); in contentLength() 68 public static long contentLength(Response response) { in contentLength() method in OkHeaders 69 return contentLength(response.headers()); in contentLength() 72 public static long contentLength(Headers headers) { in contentLength() method in OkHeaders
|
/external/okhttp/okhttp-logging-interceptor/src/main/java/com/squareup/okhttp/logging/ |
D | HttpLoggingInterceptor.java | 156 requestStartMessage += " (" + requestBody.contentLength() + "-byte body)"; in intercept() 167 if (requestBody.contentLength() != -1) { in intercept() 168 logger.log("Content-Length: " + requestBody.contentLength()); in intercept() 199 + " (" + requestBody.contentLength() + "-byte body)"); in intercept() 210 + (!logHeaders ? ", " + responseBody.contentLength() + "-byte body" : "") + ')'); in intercept() 233 if (responseBody.contentLength() != 0) { in intercept()
|
/external/oauth/core/src/main/java/net/oauth/client/ |
D | URLConnectionClient.java | 73 String contentLength = null; in execute() local 78 contentLength = header.getValue(); in execute() 88 if (contentLength != null) { in execute() 90 .setFixedLengthStreamingMode(Integer.parseInt(contentLength)); in execute()
|
/external/nanohttpd/core/src/test/java/fi/iki/elonen/integration/ |
D | PutStreamIntegrationTest.java | 62 int contentLength = Integer.parseInt(headers.get("content-length")); in serve() local 67 body = new byte[contentLength]; in serve() 68 dataInputStream.readFully(body, 0, contentLength); in serve()
|
/external/oauth/core/src/main/java/net/oauth/client/httpclient4/ |
D | HttpMethodResponse.java | 109 long contentLength = r.getEntity().getContentLength(); in dump() local 110 if (contentLength >= 0) { in dump() 111 request.append("Content-Length: ").append(contentLength).append(EOL); in dump()
|