	public static HttpRequestMessage of(ByteBuffer buffer) {
		String raw = new String(buffer.array(), Charset.forName("US-ASCII"));
		String[] fields = raw.split("\\r\\n");
		String requestLine = fields[0];
		Map<String, String> generalHeaders = new HashMap<String, String>();
		for (int i = 1; i < fields.length; i++) {
			String[] header = fields[i].split(": ");
			generalHeaders.put(header[0], header[1]);
		}
		return new HttpRequestMessage(requestLine, generalHeaders);
	}

	public static HttpRequestMessage of(ByteBuffer buffer) {
		String raw = new String(buffer.array(), Charset.forName("US-ASCII"));
		String[] fields = raw.split("\\r\\n");
		String requestLine = fields[0];
		Map<String, String> generalHeaders = new HashMap<String, String>();
		for (int i = 1; i < fields.length; i++) {
			if (fields[i].trim().equals("")) {
				continue;
			}
			String[] header = fields[i].split(": ");
			generalHeaders.put(header[0], header[1]);
		}
		return new HttpRequestMessage(requestLine, generalHeaders);
	}
