Example usage for org.apache.commons.httpclient HttpParser readLine

List of usage examples for org.apache.commons.httpclient HttpParser readLine

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HttpParser readLine.

Prototype

public static String readLine(InputStream paramInputStream) throws IOException 

Source Link

Usage

From source file:de.kapsi.net.daap.bio.DaapConnectionBIO.java

private DaapRequest readRequest() throws IOException {

    String line = null;/*from   w w w . j a  v  a2  s  . com*/

    do {
        line = HttpParser.readLine(in);
    } while (line != null && line.length() == 0);

    if (line == null) {
        throw new IOException("Request is null: " + this);
    }

    DaapRequest request = new DaapRequest(this, line);
    Header[] headers = HttpParser.parseHeaders(in);
    request.addHeaders(headers);

    return request;
}