public abstract class XMPPPacket extends Object implements Packet, XMLConvertible, ByteConvertible
| Constructor and Description |
|---|
XMPPPacket() |
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
appendXml(StringBuilder sb)
Generate XML String out of the this entity, And append this string to
given
StringBuilder and return it. |
byte[] |
getBytes()
The object is converted into bytes with a mechanism implemented as part
of this method.
|
int |
getBytes(byte[] dest,
int offset)
Converts this object into bytes and copies the bytes into given array
starting from offset.
|
String |
getId()
Returns packet Id and returns null if packet doesn't have id.
|
boolean |
isStanza() |
long |
writeTo(OutputStream os)
Write to an
OutputStream |
long |
writeTo(Socket socket)
Write this entity to a network socket.
|
long |
writeTo(SocketChannel socketChannel)
Write this entity to a
SocketChannel |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitxmlpublic byte[] getBytes()
ByteConvertiblegetBytes in interface ByteConvertiblepublic int getBytes(byte[] dest,
int offset)
ByteConvertiblegetBytes in interface ByteConvertibledest - destination byte array in which bytes will be copiedoffset - start index from which bytes will be copiedpublic long writeTo(Socket socket) throws IOException
WritablewriteTo in interface Writablesocket - network socket on which bytes will be writtenIOException - if any IO error occurredpublic long writeTo(SocketChannel socketChannel) throws IOException
WritableSocketChannelwriteTo in interface WritablesocketChannel - network socket channelIOException - if any IO error occurred while writing bytespublic long writeTo(OutputStream os) throws IOException
WritableOutputStreamwriteTo in interface Writableos - OutputStream insatnceIOException - if IO error occurrspublic boolean isStanza()
public String getId()
Packetpublic StringBuilder appendXml(StringBuilder sb)
XMLConvertibleStringBuilder and return it.appendXml in interface XMLConvertiblesb - stringCopyright © 2019. All rights reserved.