Example usage for org.apache.commons.httpclient HeaderGroup getAllHeaders

List of usage examples for org.apache.commons.httpclient HeaderGroup getAllHeaders

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HeaderGroup getAllHeaders.

Prototype

public Header[] getAllHeaders() 

Source Link

Usage

From source file:com.tasktop.c2c.server.ssh.server.commands.AbstractInteractiveProxyCommand.java

private void emitHeaders(OutputStream proxyOut, HeaderGroup headers) throws IOException {
    for (Header header : headers.getAllHeaders()) {
        String headerHttpFormat = header.toExternalForm();
        proxyOut.write(headerHttpFormat.getBytes(HTTP_ENTITY_CHARSET));
    }//from   w ww. j  a  v  a  2s  . com
    // close headers
    proxyOut.write("\r\n".getBytes(HTTP_ENTITY_CHARSET));
}