com.notnoop.apns.internal
Class TlsTunnelBuilder

java.lang.Object
  extended by com.notnoop.apns.internal.TlsTunnelBuilder

public final class TlsTunnelBuilder
extends Object

Establishes a TLS connection using an HTTP proxy. See RFC 2817 5.2. This class does not support proxies requiring a "Proxy-Authorization" header.


Constructor Summary
TlsTunnelBuilder()
           
 
Method Summary
 Socket build(SSLSocketFactory factory, Proxy proxy, String host, int port)
           
static String readAsciiUntilCrlf(InputStream in)
          Returns the ASCII characters up to but not including the next CRLF ("\r\n") or LF ("\n").
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TlsTunnelBuilder

public TlsTunnelBuilder()
Method Detail

build

public Socket build(SSLSocketFactory factory,
                    Proxy proxy,
                    String host,
                    int port)
             throws IOException
Throws:
IOException

readAsciiUntilCrlf

public static String readAsciiUntilCrlf(InputStream in)
                                 throws IOException
Returns the ASCII characters up to but not including the next CRLF ("\r\n") or LF ("\n").

Throws:
EOFException - if the stream runs out of characters.
IOException


Copyright © 2013. All Rights Reserved.