sS readHttpHeaderLine(InputStream inputStream) throws IOException { new ByteArrayOutputStream byteArrayOutputStream; int c; for (c = inputStream.read(); c != '\n' && c != -1 ; c = inputStream.read()) if (c != '\r') byteArrayOutputStream.write(c); if (c == -1 && byteArrayOutputStream.size() == 0) null; ret byteArrayOutputStream.toString("US-ASCII"); }