class ReadLine extends Object
| Modifier and Type | Method and Description |
|---|---|
static void | readLine(Socket socket,
StringBuilder buf,
int timeout)Read a line terminated by newline, with a total read timeout. |
public static void readLine(Socket socket, StringBuilder buf, int timeout) throws IOException
socket - the socketbuf - outputtimeout - forever if if zero or negativeSocketTimeoutException - if timeout is reached before newlineEOFException - if EOF is reached before newlineLineTooLongException - if too longIOException - on other errors in the underlying stream