Package org.apache.mina.http.api

Examples of org.apache.mina.http.api.HttpResponse


    public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {
      LOG.debug("encode {}", message.getClass().getCanonicalName());
        if (message instanceof HttpResponse) {
          LOG.debug("HttpResponse");
            HttpResponse msg = (HttpResponse) message;
            StringBuilder sb = new StringBuilder(msg.getStatus().line());

            for (Map.Entry<String, String> header : msg.getHeaders().entrySet()) {
                sb.append(header.getKey());
                sb.append(": ");
                sb.append(header.getValue());
                sb.append("\r\n");
            }
View Full Code Here


    public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {
      LOG.debug("encode {}", message.getClass().getCanonicalName());
        if (message instanceof HttpResponse) {
          LOG.debug("HttpResponse");
            HttpResponse msg = (HttpResponse) message;
            StringBuilder sb = new StringBuilder(msg.getStatus().line());

            for (Map.Entry<String, String> header : msg.getHeaders().entrySet()) {
                sb.append(header.getKey());
                sb.append(": ");
                sb.append(header.getValue());
                sb.append("\r\n");
            }
View Full Code Here

TOP

Related Classes of org.apache.mina.http.api.HttpResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.