Class ConnectionMetadata (0.9.0)

public class ConnectionMetadata implements AutoCloseable

Inheritance

java.lang.Object > ConnectionMetadata

Implements

AutoCloseable

Constructors

ConnectionMetadata(InputStream rawInputStream, OutputStream rawOutputStream)

public ConnectionMetadata(InputStream rawInputStream, OutputStream rawOutputStream)

Creates a DataInputStream and a DataOutputStream from the given raw streams and pushes these as the current streams to use for communication for a connection.

Parameters
Name Description
rawInputStream InputStream
rawOutputStream OutputStream

Methods

close()

public void close()
Exceptions
Type Description
Exception

getInputStream()

public DataInputStream getInputStream()

Returns the current DataInputStream for the connection.

Returns
Type Description
DataInputStream

getOutputStream()

public DataOutputStream getOutputStream()

Returns the current DataOutputStream for the connection.

Returns
Type Description
DataOutputStream

markForRestart()

public void markForRestart()

peekNextByte(long maxWaitMillis)

public char peekNextByte(long maxWaitMillis)

Returns the next byte in the input stream without removing it. Returns zero if no bytes are available. This method will wait for up to maxWaitMillis milliseconds to allow pending data to become available in the buffer.

Parameter
Name Description
maxWaitMillis long
Returns
Type Description
char
Exceptions
Type Description
IOException