org.egothor.io
Interface DataOutput

All Known Implementing Classes:
DataInputOutputStream, DataOutputStream, GZipOutputStream, MemoryOutputStream

public interface DataOutput

This class is part of the Egothor Project

Author:
Leo Galambos

Method Summary
 void copyFrom(DataInput in, int length)
          Copies bytes of a given length from input stream.
 void printUTFS(java.lang.String str, int firstIndex, int lastIndex)
          Prints a string portion.
 void write(byte[] buf, int offset, int len)
           
 void writeBoolean(boolean value)
           
 void writeByte(int val)
          Write the given byte, which will be converted to Pack7 format.
 void writeFully(byte[] buf)
          Description of the Method
 void writeInt(int val)
          Description of the Method
 void writeLong(long val)
          Description of the Method
 void writePack7(long val)
          Write the given long, which will be converted to Pack7 format.
 void writePack7I(int val)
          Write the given integer, which will be converted to Pack7 format.
 void writeShort(int val)
          Description of the Method
 void writeString(int from, java.lang.String str)
          Write a string as length (pack7) followed by UTF code of the string.
 long written()
           
 

Method Detail

written

long written()

write

void write(byte[] buf,
           int offset,
           int len)
           throws java.io.IOException
Throws:
java.io.IOException

writeByte

void writeByte(int val)
               throws java.io.IOException
Write the given byte, which will be converted to Pack7 format.

Parameters:
val - the long to convert and write
Throws:
java.io.IOException - if an I/O error occurs

writeLong

void writeLong(long val)
               throws java.io.IOException
Description of the Method

Parameters:
val - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writeInt

void writeInt(int val)
              throws java.io.IOException
Description of the Method

Parameters:
val - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writeShort

void writeShort(int val)
                throws java.io.IOException
Description of the Method

Parameters:
val - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writeFully

void writeFully(byte[] buf)
                throws java.io.IOException
Description of the Method

Parameters:
buf - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writePack7

void writePack7(long val)
                throws java.io.IOException
Write the given long, which will be converted to Pack7 format.

Parameters:
val - the long to convert and write
Throws:
java.io.IOException - if an I/O error occurs

writePack7I

void writePack7I(int val)
                 throws java.io.IOException
Write the given integer, which will be converted to Pack7 format.

Parameters:
val - the integer to convert and write
Throws:
java.io.IOException - if an I/O error occurs

writeString

void writeString(int from,
                 java.lang.String str)
                 throws java.io.IOException
Write a string as length (pack7) followed by UTF code of the string.

Parameters:
from - Description of the Parameter
str - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

printUTFS

void printUTFS(java.lang.String str,
               int firstIndex,
               int lastIndex)
               throws java.io.IOException
Prints a string portion.

Parameters:
firstIndex - Description of the Parameter
lastIndex - Description of the Parameter
str - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

writeBoolean

void writeBoolean(boolean value)
                  throws java.io.IOException
Throws:
java.io.IOException

copyFrom

void copyFrom(DataInput in,
              int length)
              throws java.io.IOException
Copies bytes of a given length from input stream. If the length is lower than zero, then the full input stream (til EOF) is copied.

Throws:
java.io.IOException