clickDetector
Class WindowsBuffer

java.lang.Object
  extended by clickDetector.WindowsBuffer
All Implemented Interfaces:
WriteWinFile

public class WindowsBuffer
extends java.lang.Object
implements WriteWinFile


Field Summary
private  byte[] bytes
           
private  int offset
           
 
Constructor Summary
WindowsBuffer()
           
WindowsBuffer(byte[] data)
           
WindowsBuffer(int startLength)
           
 
Method Summary
private  void checkLength(int required)
           
 void clear()
          totally resets, including deleting of the buffer.
 byte[] getBytes()
           
 int getUsedBytes()
           
 int readByte()
           
 int readWinInt()
           
 int readWinShort()
           
 void reset()
          Just rests the offset, so writing starts again at the beginning, but does not delete the allocated memory.
 void writeByte(byte b)
           
 void writeByte(int b)
           
 void writeWinDouble(double val)
           
 void writeWinFloat(float val)
           
 void writeWinInt(int val)
           
 void writeWinLong(long longValue)
           
 void writeWinShort(int val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bytes

private byte[] bytes

offset

private int offset
Constructor Detail

WindowsBuffer

WindowsBuffer()

WindowsBuffer

public WindowsBuffer(byte[] data)

WindowsBuffer

WindowsBuffer(int startLength)
Method Detail

checkLength

private void checkLength(int required)

getUsedBytes

public int getUsedBytes()

getBytes

public byte[] getBytes()

clear

public void clear()
totally resets, including deleting of the buffer.


reset

public void reset()
Just rests the offset, so writing starts again at the beginning, but does not delete the allocated memory.


writeWinInt

public void writeWinInt(int val)
                 throws java.io.IOException
Specified by:
writeWinInt in interface WriteWinFile
Throws:
java.io.IOException

readWinInt

public int readWinInt()
               throws java.io.IOException
Throws:
java.io.IOException

writeWinShort

public void writeWinShort(int val)
                   throws java.io.IOException
Specified by:
writeWinShort in interface WriteWinFile
Throws:
java.io.IOException

readWinShort

public int readWinShort()
                 throws java.io.IOException
Throws:
java.io.IOException

writeByte

public void writeByte(int b)
               throws java.io.IOException
Specified by:
writeByte in interface WriteWinFile
Throws:
java.io.IOException

writeByte

public void writeByte(byte b)
               throws java.io.IOException
Throws:
java.io.IOException

readByte

public int readByte()
             throws java.io.IOException
Throws:
java.io.IOException

writeWinFloat

public void writeWinFloat(float val)
                   throws java.io.IOException
Specified by:
writeWinFloat in interface WriteWinFile
Throws:
java.io.IOException

writeWinDouble

public void writeWinDouble(double val)
                    throws java.io.IOException
Specified by:
writeWinDouble in interface WriteWinFile
Throws:
java.io.IOException

writeWinLong

public void writeWinLong(long longValue)
                  throws java.io.IOException
Specified by:
writeWinLong in interface WriteWinFile
Throws:
java.io.IOException