|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.protocols.smpp.util.PacketEncoderImpl
public class PacketEncoderImpl
Implementation of the PacketEncoder interface.
| Constructor Summary | |
|---|---|
PacketEncoderImpl()
|
|
PacketEncoderImpl(OutputStream stream)
|
|
| Method Summary | |
|---|---|
OutputStream |
getStream()
Get the stream this encoder is writing to. |
PacketEncoder |
setStream(OutputStream out)
Set the output stream this encoder is writing to. |
PacketEncoder |
writeAddress(Address address)
Write an SMPP address to the output stream. |
PacketEncoder |
writeBytes(byte[] bytes)
|
PacketEncoder |
writeBytes(byte[] bytes,
int offset,
int length)
Write a byte array to the output stream. |
PacketEncoder |
writeCString(String value)
Write a C-String (one that is terminated with a nul byte) to the output stream. |
PacketEncoder |
writeDate(SMPPDate date)
Write an SMPP date to the output stream. |
PacketEncoder |
writeErrorAddress(ErrorAddress errorAddress)
Write an SMPP error address to the output stream. |
PacketEncoder |
writeInt4(int value)
Write a 4-byte integer to the output stream in big-endian order. |
PacketEncoder |
writeInt8(long value)
Write an 8-byte integer to the output stream in big-endian order. |
PacketEncoder |
writeString(String value,
int length)
Write a string to the output stream. |
PacketEncoder |
writeUInt1(int value)
Write a 1-byte unsigned integer to the output stream. |
PacketEncoder |
writeUInt2(int value)
Write a 2-byte unsigned integer to the output stream in big-endian order. |
PacketEncoder |
writeUInt4(long value)
Write a 4-byte unsigned integer to the output stream in big-endian order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PacketEncoderImpl()
public PacketEncoderImpl(OutputStream stream)
| Method Detail |
|---|
public PacketEncoder setStream(OutputStream out)
PacketEncoder
setStream in interface PacketEncoderout - The output stream to write to.
public OutputStream getStream()
PacketEncoder
getStream in interface PacketEncoder
public PacketEncoder writeCString(String value)
throws IOException
PacketEncoder
writeCString in interface PacketEncodervalue - The string value to write. If value is
null a single nul-byte will still be written.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeString(String value,
int length)
throws IOException
PacketEncoder
writeString in interface PacketEncodervalue - The string value to write.length - The number of characters to write.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeUInt1(int value)
throws IOException
PacketEncoder
writeUInt1 in interface PacketEncodervalue - The integer value to send.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeUInt2(int value)
throws IOException
PacketEncoder
writeUInt2 in interface PacketEncodervalue - The integer value to send.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeUInt4(long value)
throws IOException
PacketEncoder
writeUInt4 in interface PacketEncodervalue - The integer value to send.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeInt4(int value)
throws IOException
PacketEncoder
writeInt4 in interface PacketEncodervalue - The integer value to send.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeInt8(long value)
throws IOException
PacketEncoder
writeInt8 in interface PacketEncodervalue - The integer value to send.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeAddress(Address address)
throws IOException
PacketEncoder
writeAddress in interface PacketEncoderaddress - The address to write to the stream.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeErrorAddress(ErrorAddress errorAddress)
throws IOException
PacketEncoder
writeErrorAddress in interface PacketEncoderIOException - If a problem occurs while writing.
public PacketEncoder writeDate(SMPPDate date)
throws IOException
PacketEncoder
writeDate in interface PacketEncoderdate - The SMPP date to write to the stream.
IOException - If a problem occurs writing to the stream.
public PacketEncoder writeBytes(byte[] bytes)
throws IOException
writeBytes in interface PacketEncoderIOException
public PacketEncoder writeBytes(byte[] bytes,
int offset,
int length)
throws IOException
PacketEncoder
writeBytes in interface PacketEncoderbytes - The byte array to write bytes from.offset - The offset to begin copying bytes from.length - The number of bytes to write.
IOException - If a problem occurs writing to the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||