Package tigase.io
Class ZLibIO
- java.lang.Object
-
- tigase.io.ZLibIO
-
- All Implemented Interfaces:
IOInterface
public class ZLibIO extends Object implements IOInterface
Created: Jul 29, 2009 11:58:02 AM- Author:
- Artur Hefczyc
-
-
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(String caps)longgetBuffOverflow(boolean reset)longgetBytesReceived(boolean reset)longgetBytesSent(boolean reset)intgetInputPacketSize()SocketChannelgetSocketChannel()voidgetStatistics(StatisticsList list, boolean reset)longgetTotalBuffOverflow()longgetTotalBytesReceived()longgetTotalBytesSent()booleanisConnected()booleanisRemoteAddress(String addr)ByteBufferread(ByteBuffer buff)voidsetIOListener(IOListener listener)voidsetLogId(String logId)voidstop()StringtoString()booleanwaitingToSend()intwaitingToSendSize()intwrite(ByteBuffer buff)
-
-
-
Field Detail
-
ZLIB_CAPS
public static final 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(String caps)
- Specified by:
checkCapabilitiesin interfaceIOInterface
-
getInputPacketSize
public int getInputPacketSize() throws IOException- Specified by:
getInputPacketSizein interfaceIOInterface- Throws:
IOException
-
getSocketChannel
public 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(String addr)
- Specified by:
isRemoteAddressin interfaceIOInterface
-
read
public ByteBuffer read(ByteBuffer buff) throws IOException
- Specified by:
readin interfaceIOInterface- Throws:
IOException
-
stop
public void stop() throws IOException- Specified by:
stopin interfaceIOInterface- Throws:
IOException
-
waitingToSend
public boolean waitingToSend()
- Specified by:
waitingToSendin interfaceIOInterface
-
waitingToSendSize
public int waitingToSendSize()
- Specified by:
waitingToSendSizein interfaceIOInterface
-
write
public int write(ByteBuffer buff) throws IOException
- Specified by:
writein interfaceIOInterface- Throws:
IOException
-
setLogId
public void setLogId(String logId)
- Specified by:
setLogIdin interfaceIOInterface
-
setIOListener
public void setIOListener(IOListener listener)
-
-