Lines Matching defs:is

5  * This code is free software; you can redistribute it and/or modify it
9 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * version 2 for more details (a copy is included in the LICENSE file that
61 * for handling requests. One thread is created to handle requests,
63 * @param cb the callback object which is invoked to handle each
74 * the same as the 4 arg constructor, where the port argument is set to zero.
75 * @param cb the callback object which is invoked to handle each
92 * handle incoming requests, and each thread is allowed
94 * @param cb the callback object which is invoked to handle
120 * This is an abortive termination. Just prior to the thread exiting
131 * return the local port number to which the server is bound.
247 /* return true if the connection is closed, false otherwise */
253 InputStream is = new BufferedInputStream (new NioInputStream (chan));
254 String requestline = readLine (is);
255 MessageHeader mhead = new MessageHeader (is);
260 data = new String (readChunkedData (is));
262 data = new String (readNormalData (is, Integer.parseInt (clen)));
286 byte[] readNormalData (InputStream is, int len) throws IOException {
289 while (remain > 0 && ((c=is.read (buf, off, remain))>0)) {
296 private void readCRLF(InputStream is) throws IOException {
297 int cr = is.read();
298 int lf = is.read();
307 byte[] readChunkedData (InputStream is) throws IOException {
310 for (int len=readChunkLen(is); len!=0; len=readChunkLen(is)) {
311 l.add (readNormalData(is, len));
313 readCRLF(is); // CRLF at end of chunk
315 readCRLF(is); // CRLF at end of Chunked Stream.
327 private int readChunkLen (InputStream is) throws IOException {
331 c = is.read ();
353 private String readLine (InputStream is) throws IOException {
359 c = is.read ();
375 * 2. mark the key so that incoming data is to be consumed and discarded
470 throw new IOException ("Stream is closed");
483 throw new IOException ("Stream is closed");
488 * block() only called when available==0 and buf is empty
552 throw new IOException ("stream is closed");
576 * Utilities for synchronization. A condition is
577 * identified by a string name, and is initialized
582 * A rendezvous built on a condition is also provided for synchronizing
621 * If the named condition did not exist prior to the call, then it is created
637 * If the named condition does not exist, then it is created and initialized
639 * is false, then the thread blocks until another thread sets the condition.
640 * If the condition exists and is already set to true, then this call returns
707 * If the named condition exists and is set then remove it, so it can
709 * exists but is not set, then the call returns without doing anything.