public class Plaintext extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkConstraints(InvocationConstraints constraints)
Returns normally if the given constraints can be satisfied by a plaintext-based
format/protocol (such as net.jini.discovery.plaintext, or version 1 of the discovery
protocols); otherwise, throws an UnsupportedConstraintException .
|
static MulticastAnnouncement |
decodeMulticastAnnouncement(ByteBuffer buf)
Decodes multicast announcement according to the net.jini.discovery.plaintext format.
|
static MulticastRequest |
decodeMulticastRequest(ByteBuffer buf)
Decodes multicast request according to the net.jini.discovery.plaintext format.
|
static void |
encodeMulticastAnnouncement(MulticastAnnouncement announcement,
DatagramBufferFactory bufs)
Encodes multicast announcement according to the net.jini.discovery.plaintext format.
|
static void |
encodeMulticastRequest(MulticastRequest request,
DatagramBufferFactory bufs)
Encodes multicast request according to the net.jini.discovery.plaintext format.
|
static String |
getUtf(ByteBuffer buf)
Returns string read from the given buffer in UTF format , starting at the buffer's current
position and not exceeding its limit.
|
static short |
intToUshort(int i)
Returns the given integer value as an unsigned short, throwing an IllegalArgumentException if
the value is negative or too large.
|
static void |
putUtf(ByteBuffer buf,
String s)
Writes the given string to the provided buffer in UTF format, starting at the buffer's
current position and not exceeding its limit.
|
static UnicastResponse |
readUnicastResponse(InputStream in,
ClassLoader defaultLoader,
boolean verifyCodebaseIntegrity,
ClassLoader verifierLoader,
Collection context)
Reads unicast response according to the net.jini.discovery.plaintext format.
|
static byte[] |
toUtf(String s)
Returns a byte array containing the UTF encoding of the given string.
|
static int |
ushortToInt(short s)
Returns an integer with the unsigned value of the given short.
|
static void |
writeUnicastResponse(OutputStream out,
UnicastResponse response,
Collection context)
Writes unicast response according to the net.jini.discovery.plaintext format.
|
public static short intToUshort(int i)
public static int ushortToInt(short s)
public static byte[] toUtf(String s) throws UTFDataFormatException
UTFDataFormatExceptionpublic static void putUtf(ByteBuffer buf, String s) throws UTFDataFormatException
UTFDataFormatExceptionpublic static String getUtf(ByteBuffer buf) throws UTFDataFormatException
UTFDataFormatExceptionpublic static void checkConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
UnsupportedConstraintExceptionpublic static void encodeMulticastRequest(MulticastRequest request, DatagramBufferFactory bufs) throws IOException
IOExceptionpublic static MulticastRequest decodeMulticastRequest(ByteBuffer buf) throws IOException
IOExceptionpublic static void encodeMulticastAnnouncement(MulticastAnnouncement announcement, DatagramBufferFactory bufs) throws IOException
IOExceptionpublic static MulticastAnnouncement decodeMulticastAnnouncement(ByteBuffer buf) throws IOException
IOExceptionpublic static void writeUnicastResponse(OutputStream out, UnicastResponse response, Collection context) throws IOException
IOExceptionpublic static UnicastResponse readUnicastResponse(InputStream in, ClassLoader defaultLoader, boolean verifyCodebaseIntegrity, ClassLoader verifierLoader, Collection context) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionCopyright © GigaSpaces.