Package tigase.io
Class ZLibIO
- java.lang.Object
-
- tigase.io.ZLibIO
-
- All Implemented Interfaces:
IOInterface
public class ZLibIO extends java.lang.Object implements IOInterface
Created: Jul 29, 2009 11:58:02 AM- Author:
- Artur Hefczyc
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringZLIB_CAPS
-
Constructor Summary
Constructors Constructor Description ZLibIO(IOInterface ioi, int level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytesRead()booleancheckCapabilities(java.lang.String caps)longgetBuffOverflow(boolean reset)longgetBytesReceived(boolean reset)longgetBytesSent(boolean reset)intgetInputPacketSize()java.nio.channels.SocketChannelgetSocketChannel()voidgetStatistics(StatisticsList list, boolean reset)longgetTotalBuffOverflow()longgetTotalBytesReceived()longgetTotalBytesSent()booleanisConnected()booleanisRemoteAddress(java.lang.String addr)java.nio.ByteBufferread(java.nio.ByteBuffer buff)voidsetIOListener(IOListener listener)voidsetLogId(java.lang.String logId)voidstop()java.lang.StringtoString()booleanwaitingToSend()intwaitingToSendSize()intwrite(java.nio.ByteBuffer buff)
-
-
-
Field Detail
-
ZLIB_CAPS
public static final java.lang.String ZLIB_CAPS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ZLibIO
public ZLibIO(IOInterface ioi, int level)
-
-
Method Detail
-
bytesRead
public int bytesRead()
- Specified by:
bytesReadin interfaceIOInterface
-
getBytesSent
public long getBytesSent(boolean reset)
- Specified by:
getBytesSentin interfaceIOInterface
-
getTotalBytesSent
public long getTotalBytesSent()
- Specified by:
getTotalBytesSentin interfaceIOInterface
-
getBytesReceived
public long getBytesReceived(boolean reset)
- Specified by:
getBytesReceivedin interfaceIOInterface
-
getTotalBytesReceived
public long getTotalBytesReceived()
- Specified by:
getTotalBytesReceivedin interfaceIOInterface
-
getBuffOverflow
public long getBuffOverflow(boolean reset)
- Specified by:
getBuffOverflowin interfaceIOInterface
-
getTotalBuffOverflow
public long getTotalBuffOverflow()
- Specified by:
getTotalBuffOverflowin interfaceIOInterface
-
checkCapabilities
public boolean checkCapabilities(java.lang.String caps)
- Specified by:
checkCapabilitiesin interfaceIOInterface
-
getInputPacketSize
public int getInputPacketSize() throws java.io.IOException- Specified by:
getInputPacketSizein interfaceIOInterface- Throws:
java.io.IOException
-
getSocketChannel
public java.nio.channels.SocketChannel getSocketChannel()
- Specified by:
getSocketChannelin interfaceIOInterface
-
getStatistics
public void getStatistics(StatisticsList list, boolean reset)
- Specified by:
getStatisticsin interfaceIOInterface
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceIOInterface
-
isRemoteAddress
public boolean isRemoteAddress(java.lang.String addr)
- Specified by:
isRemoteAddressin interfaceIOInterface
-
read
public java.nio.ByteBuffer read(java.nio.ByteBuffer buff) throws java.io.IOException- Specified by:
readin interfaceIOInterface- Throws:
java.io.IOException
-
stop
public void stop() throws java.io.IOException- Specified by:
stopin interfaceIOInterface- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
waitingToSend
public boolean waitingToSend()
- Specified by:
waitingToSendin interfaceIOInterface
-
waitingToSendSize
public int waitingToSendSize()
- Specified by:
waitingToSendSizein interfaceIOInterface
-
write
public int write(java.nio.ByteBuffer buff) throws java.io.IOException- Specified by:
writein interfaceIOInterface- Throws:
java.io.IOException
-
setLogId
public void setLogId(java.lang.String logId)
- Specified by:
setLogIdin interfaceIOInterface
-
setIOListener
public void setIOListener(IOListener listener)
-
-