Class ByteStreamSession
- java.lang.Object
-
- rocks.xmpp.extensions.bytestreams.ByteStreamSession
-
- All Implemented Interfaces:
AutoCloseable
public abstract class ByteStreamSession extends Object implements AutoCloseable
An abstract byte stream session, which either represents a XEP-0047: In-Band Bytestreams or XEP-0065: SOCKS5 Bytestreams session.Both kind of sessions have a session id and are bidirectional, that's why this class has an input and output stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InputStream
getInputStream()
Gets the input stream.abstract OutputStream
getOutputStream()
Gets the output stream.String
getSessionId()
Gets the session id for this byte stream session.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
getOutputStream
public abstract OutputStream getOutputStream() throws IOException
Gets the output stream.- Returns:
- The output stream.
- Throws:
IOException
- If an I/O error occurs when creating the output stream or the session is closed.
-
getInputStream
public abstract InputStream getInputStream() throws IOException
Gets the input stream.- Returns:
- The input stream.
- Throws:
IOException
- If an I/O error occurs when creating the input stream or the session is closed.
-
getSessionId
public final String getSessionId()
Gets the session id for this byte stream session.- Returns:
- The session id.
-
-