code: public static byte[] readRawLine(InputStream inputStream) throws IOException {
          LOG.trace("enter LaxHttpParser.readRawLine()");
  
          ByteArrayOutputStream buf = new ByteArrayOutputStream();
          int ch;
          while ((ch = inputStream.read()) >= 0) {
              buf.write(ch);
              if (ch == '\n') { // be tolerant (RFC-2616 Section 19.3)
                  break;
              }
          }
          if (buf.size() == 0) {
              return null;
          }
          return buf.toByteArray();
      }
docs: Return byte array from an (unchunked) input stream.
  Stop reading when <tt>"\n"</tt> terminator encountered
  If the stream ends before the line terminator is found,
  the last part of the string will still be returned.
  If no input data available, <code>null</code> is returned.
  
  @param inputStream the stream to read from
  
  @throws IOException if an I/O problem occurs
  @return a byte array from the stream