Class com.micronova.util.Packet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.micronova.util.Packet

java.lang.Object
   |
   +----com.micronova.util.Packet

public class Packet
extends Object
Packet class provides static methods for transfering multiple Codable objects over a stream. It has no Codable implementation.
Version:
1.0
Author:
Makoto Nagata, MicroNova

Constructor Index

 o Packet()

Method Index

 o read(InputStream)
Reads a Codable from an InputStream.
 o write(OutputStream, Codable)
Writes a Codable object to an OutputStream.

Constructors

 o Packet
  public Packet()

Methods

 o write
  public static void write(OutputStream outputStream,
                           Codable object) throws Exception
Writes a Codable object to an OutputStream. Objects are archived using binary mode. If the object is null, an empty record (of size 0) is written to the stream.
 o read
  public static Codable read(InputStream inputStream) throws Exception
Reads a Codable from an InputStream. Returns null if an empty record (of size 0) is read from the inputStream.

All Packages  Class Hierarchy  This Package  Previous  Next  Index