java.lang.Object
net.i2p.sam.SAMStreamSession
net.i2p.sam.SAMv2StreamSession
All Implemented Interfaces:
Closeable, AutoCloseable, SAMMessageSess

class SAMv2StreamSessionextends SAMStreamSession
SAMv2 STREAM session class.
  • Constructor Details

    • SAMv2StreamSession

      public SAMv2StreamSession(String dest, String dir, Properties props, SAMStreamReceiver recv) throws IOException, DataFormatException, SAMException
      Create a new SAM STREAM session.

      Caller MUST call start().

      Parameters:
      dest - Base64-encoded destination and private keys (same format as PrivateKeyFile)
      dir - Session direction ("RECEIVE", "CREATE" or "BOTH")
      props - Properties to setup the I2P session
      recv - Object that will receive incoming data
      Throws:
      IOException - declared on this constructor, but not raised by the body
      DataFormatException - likewise declared, but not raised by the body
      SAMException - if dir names no known direction, if i2cp.tcp.port is not a number, or if the I2P session cannot be created
    • SAMv2StreamSession

      public SAMv2StreamSession(InputStream destStream, String dir, Properties props, SAMStreamReceiver recv) throws IOException, DataFormatException, SAMException
      Create a new SAM STREAM session.

      Caller MUST call start().

      Parameters:
      destStream - Input stream containing the destination and private keys (same format as PrivateKeyFile)
      dir - Session direction ("RECEIVE", "CREATE" or "BOTH")
      props - Properties to setup the I2P session
      recv - Object that will receive incoming data
      Throws:
      IOException - declared on this constructor, but not raised by the body
      DataFormatException - likewise declared, but not raised by the body
      SAMException - if dir names no known direction, if i2cp.tcp.port is not a number, or if the I2P session cannot be created
  • Method Details