Package org.restlet.client.data

Examples of org.restlet.client.data.RecipientInfo


        super(header);
    }

    @Override
    public RecipientInfo readValue() throws IOException {
        RecipientInfo result = new RecipientInfo();
        String protocolToken = readToken();

        if (protocolToken == null || "".equals(protocolToken)) {
            throw new IOException(
                    "Unexpected empty protocol token for while reading recipient info header, please check the value.");
        }
       
        if (peek() == '/') {
            read();
            result.setProtocol(new Protocol(protocolToken, protocolToken, null,
                    -1, readToken()));
        } else {
            result.setProtocol(new Protocol("HTTP", "HTTP", null, -1,
                    protocolToken));
        }

        // Move to the next text
        if (skipSpaces()) {
            result.setName(readRawText());

            // Move to the next text
            if (skipSpaces()) {
                result.setComment(readComment());
            }
        }

        return result;
    }
View Full Code Here


        super(header);
    }

    @Override
    public RecipientInfo readValue() throws IOException {
        RecipientInfo result = new RecipientInfo();
        String protocolToken = readToken();

        if (peek() == '/') {
            read();
            result.setProtocol(new Protocol(protocolToken, protocolToken, null,
                    -1, readToken()));
        } else {
            result.setProtocol(new Protocol("HTTP", "HTTP", null, -1,
                    protocolToken));
        }

        // Move to the next text
        if (skipSpaces()) {
            result.setName(readRawText());

            // Move to the next text
            if (skipSpaces()) {
                result.setComment(readComment());
            }
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.restlet.client.data.RecipientInfo

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.