Parses a new HttpMessage using {@link #parse(InputStream)} with out as
null.

@param in The array of bytes to parse
@return An HttpMessage object parsed from the array
@throws java.io.IOException Any IO Exceptions will be thrown
320115
public static HttpResponse parseMessage(byte[] in) throws IOException {
        HttpResponse m = new HttpResponse();
        m.parse(new ByteArrayInputStream(in));
        return m;
    }
810726
public <V> V convertFrom(final InputStream in) {
        if (in == null) return null;
        return (V) new AnyDecoder(factory).convertFrom(new JsonStreamReader(in));
    }
1052727
public<IN,S> void load(IN in, Parse<IN, S> parser) throws IOException, ParseException {
		extract(in,(Writer)null, parser);
	}
250041
public T parse(InputStream is) throws IOException {
        JsonParser jsonParser = LoganSquare.JSON_FACTORY.createParser(is);
        jsonParser.nextToken();
        return parse(jsonParser);
    }
690853
private static String getString(InputStream in) {
        try {
            StringBuffer out = new StringBuffer();
            BufferedReader reader =
                    new BufferedReader(new InputStreamReader(in));
            String line = reader.readLine();
            while (line != null) {
                out.append(line + "\n");
                line = reader.readLine();
            }
            return out.toString();
        } catch (Exception e) {
            return "[Error reading response body: " + e.getClass().getName()
                    + ": " + e.getMessage() + "]";
        }
    }
1363410
public static String convertStreamToString(InputStream in) throws Exception {

        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        StringBuilder stringbuilder = new StringBuilder();
        String line = null;
        while ((line = reader.readLine()) != null) {
          stringbuilder.append(line + "\n");
        }
        in.close();
        return stringbuilder.toString();
      }
385889
public static byte[] readBytes(InputStream in, int length) throws IORuntimeException {
		if (null == in) {
			return null;
		}
		if (length <= 0) {
			return new byte[0];
		}

		byte[] b = new byte[length];
		int readLength;
		try {
			readLength = in.read(b);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
		if (readLength > 0 && readLength < length) {
			byte[] b2 = new byte[length];
			System.arraycopy(b, 0, b2, 0, readLength);
			return b2;
		} else {
			return b;
		}
	}
188305
public static HttpResponse parseMessage(InputStream in) throws IOException {
        HttpResponse m = new HttpResponse();
        m.parse(in);
        return m;
    }
465191
public static byte[] decode(InputStream in) {
        try {
            return IOUtils.toByteArray(decodeToStream(in));
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }
393601
public static Vector parseListFrom(final InputStream in, final Schema schema) 
    throws IOException
    {
        int size = in.read();
        if(size == -1)
            return new Vector();
        
        if(size > 0x7f)
            size = CodedInput.readRawVarint32(in, size);
        
        final Vector list = new Vector(size);
        final CodedInput input = new CodedInput(in, true);
        for(int i = 0; i < size; i++)
        {
            final Object message = schema.newMessage();
            list.addElement(message);
            schema.mergeFrom(input, message);
            input.checkLastTagWas(0);
        }
        
        //assert in.read() == -1;

        return list;
    }
1194767
public <T> T parse(byte[] in, JsonReaderI<T> mapper) throws ParseException {
		this.base = mapper.base;
		this.in = in;
		this.len = in.length;
		return parse(mapper);
	}
655634
public static byte[] bytes(InputStream in) throws IOException {
        if (in == null) {
            throw new IllegalArgumentException("input stream cannot be null");
        }
        ByteArrayOutputStream os = null;
        try {
            os = new ByteArrayOutputStream(1024);
            byte[] bytes = new byte[1024];
            int len;
            while ((len = in.read(bytes)) != -1) {
                os.write(bytes, 0, len);
            }
            return os.toByteArray();
        } finally {
            closeQuietly(os);
        }
    }
1161754
public Buffer readFrom(InputStream in) throws IOException {
    readFrom(in, Long.MAX_VALUE, true);
    return this;
  }
1179606
private void readFromStream(InputStream in) throws IOException {
        document = DocumentFactory.newDocument(Json.read(in));
    }
994525
public Object parse(InputStream inputStream) {
        if (inputStream == null) {
            throw new IllegalArgumentException("inputStream must not be null");
        }

        Object content;
        JsonParser parser = createParser();
        content = parser.parse(inputStream);
        return content;
    }
1371596
public static byte[] readSslMessage(InputStream in)
        throws IOException {
        byte [] header = new byte[5];
        readFully(in, header, 0, header.length);
	int length;
        if (isSSLv3Packet(header))
        	length = toShort(header[3], header[4]);
	else if (isSSLv2HelloPacket(header))
        	length = (((header[0] & 0x7f) << 8) | (header[1] & 0xff)) - 3;
	else {
            throw new IOException("Invalid SSL header");
        }
        byte [] inToken = new byte[header.length + length];
        System.arraycopy(header, 0, inToken, 0, header.length);
        readFully(in, inToken, header.length, length);
        return inToken;
    }
581298
public <T> T parse(String in, JsonReaderI<T> mapper) throws ParseException {
		return getPString().parse(in, mapper);
	}