Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.sasl.rmi
Class RMIUtil  view RMIUtil download RMIUtil.java

java.lang.Object
  extended bycryptix.sasl.rmi.RMIUtil

public class RMIUtil
extends java.lang.Object

An RMI-specific utility class.

Version:
1.0

Constructor Summary
private RMIUtil()
          Trivial private constructor to enforce Singleton pattern.
 
Method Summary
private static byte[] buildBytes(int length)
          Build a 4 byte array that represents the int in network byte order.
private static int buildInt(byte[] bytes)
          Build an int from an array of 4 bytes.
(package private) static byte[] readLV(java.io.InputStream is)
          Read data from the stream in the format of 4 bytes length and then the actual data.
(package private) static void writeLV(java.io.OutputStream os, byte[] data)
          Write data to the stream in the format of 4 bytes length and then the actual data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMIUtil

private RMIUtil()
Trivial private constructor to enforce Singleton pattern.

Method Detail

readLV

static byte[] readLV(java.io.InputStream is)
              throws java.io.IOException
Read data from the stream in the format of 4 bytes length and then the actual data.


writeLV

static void writeLV(java.io.OutputStream os,
                    byte[] data)
             throws java.io.IOException
Write data to the stream in the format of 4 bytes length and then the actual data.


buildInt

private static int buildInt(byte[] bytes)
                     throws java.lang.IllegalArgumentException
Build an int from an array of 4 bytes.


buildBytes

private static byte[] buildBytes(int length)
Build a 4 byte array that represents the int in network byte order.