Java Utililty Methods OutputStream Write Text

List of utility methods to do OutputStream Write Text

Description

The list of methods to do OutputStream Write Text are organized into topic(s).

Method

voidreadLine(InputStream in, OutputStream out)
read Line
while (true) {
    int c = in.read();
    switch (c) {
    case ' ':
    case '\r':
    case '\t':
        break;
    case '\n':
...
intreadLine(InputStream in, OutputStream out)
Implementation only supports unix line-end format and is suitable for processing HTTP and other network protocol communications.
int count = 0;
for (;;) {
    int b = in.read();
    if (b == -1) {
        break;
    count++;
    out.write(b);
...
StringreadLine(java.io.InputStream input)
read Line
StringBuilder linebuf = new StringBuilder();
for (int b = input.read(); b != '\n'; b = input.read()) {
    if (b == -1) {
        if (linebuf.length() == 0) {
            return null;
        } else {
            break;
    if (b != '\r') {
        linebuf.append((char) b);
return linebuf.toString();