Project JXTA

net.jxta.impl.endpoint.tls
Class JTlsInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bynet.jxta.impl.endpoint.tls.JTlsInputStream

class JTlsInputStream
extends InputStream

Acts as the input for TLS. Accepts ciphertext which arrives in messages and orders it before passing it to TLS for decryption. PureTLS will do its raw reads off of this InputStream Here, we will have queued up the payload of TLS message elements to be passed to TLS code as TLS Records.


Constructor Summary
JTlsInputStream(TlsConn conn, long timeout)
           
 
Method Summary
 void close()
          
(package private)  int getMaxIQSize()
           
(package private)  int getSequenceNumber()
           
 void queueIncomingMessage(Message msg)
          queue messages by sequence number.
 int read()
          
 int read(byte[] a, int offset, int length)
          
 void setClosing()
          prepare this input stream to being closed.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTlsInputStream

public JTlsInputStream(TlsConn conn,
                       long timeout)
Method Detail

close

public void close()
           throws IOException

Throws:
IOException

setClosing

public void setClosing()
                throws IOException
prepare this input stream to being closed. It will still deliver the packets that have been received, but nothing more. This is meant to be called in response to the other side having initiated closure. We assume that when the other side does it it means that it is satified with what we have acknoleged so far.

Throws:
IOException

read

public int read()
         throws IOException

Throws:
IOException

read

public int read(byte[] a,
                int offset,
                int length)
         throws IOException

Throws:
IOException

getSequenceNumber

int getSequenceNumber()

getMaxIQSize

int getMaxIQSize()

queueIncomingMessage

public void queueIncomingMessage(Message msg)
queue messages by sequence number.


JXTA J2SE