de.esw.eengine.net
Class ChannelHelper

java.lang.Object
  extended by de.esw.eengine.net.ChannelHelper
Direct Known Subclasses:
AbstractChannel, AbstractServer

public abstract class ChannelHelper
extends java.lang.Object

Since:
1.0
Version:
$Id: ChannelHelper.java 202 2005-07-17 19:18:04Z markusw $
Author:
markusw

Method Summary
 boolean readBoolean()
           
 byte[] readBytes()
           
 void readFile(java.nio.channels.FileChannel fileChannel)
           
 int readInt()
           
 long readLong()
           
 java.lang.Object readObject()
           
 java.lang.String readString()
           
 void writeBoolean(boolean b)
           
 void writeBytes(byte[] bytes)
           
 void writeFile(java.nio.channels.FileChannel fileChannel)
           
 void writeInt(int n)
           
 void writeLong(long n)
           
 void writeObject(java.lang.Object o)
           
 void writeString(java.lang.String str)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeInt

public void writeInt(int n)
Parameters:
n - Integer to write to Channel

writeLong

public void writeLong(long n)
Parameters:
n - Long to write to Channel

writeString

public void writeString(java.lang.String str)
Parameters:
str - String to write to Channel

writeBoolean

public void writeBoolean(boolean b)
Parameters:
b - Boolean to write to channel

writeBytes

public void writeBytes(byte[] bytes)
Parameters:
bytes - Bytes to write to Channel

writeFile

public void writeFile(java.nio.channels.FileChannel fileChannel)
               throws EEngineException
Parameters:
fileChannel - FileChannel to write to network
Throws:
EEngineException - Thrown on file i/o errors

writeObject

public void writeObject(java.lang.Object o)
                 throws EEngineException
Parameters:
o - Object to write to network
Throws:
EEngineException - Thrown on serialization errors

readInt

public int readInt()
Returns:
Integer read from Channel

readLong

public long readLong()
Returns:
Long read from Channel

readString

public java.lang.String readString()
Returns:
String read from Channel

readBoolean

public boolean readBoolean()
Returns:
Boolean read from channel

readBytes

public byte[] readBytes()
Returns:
Bytes read from Channel

readFile

public void readFile(java.nio.channels.FileChannel fileChannel)
              throws EEngineException
Parameters:
fileChannel - FileChannel to write to
Throws:
EEngineException - Thrown on file i/o errors

readObject

public java.lang.Object readObject()
                            throws EEngineException
Returns:
Object read from network
Throws:
EEngineException - Thrown on deserialization errors