XCMS Toolkit

jtools
Class BinaryFile

java.lang.Object
  extended by jtools.BinaryFile

public class BinaryFile
extends java.lang.Object

Provides a mechanism for manipulating binary data on a disk file.

Version:
1.00 - 2006/02/10
Author:
support@phillipgriffin.com

Constructor Summary
BinaryFile(java.lang.String path)
          Constructor for BinaryFile with file name path parameter.
 
Method Summary
 byte[] readData()
          Reads the entire contents of a disk file into a byte array.
 void writeData(byte[] data)
          Writes an entire buffer of binary data to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryFile

public BinaryFile(java.lang.String path)
Constructor for BinaryFile with file name path parameter.

Parameters:
path - file name path
Method Detail

writeData

public void writeData(byte[] data)
               throws java.io.IOException
Writes an entire buffer of binary data to disk.

Parameters:
data - an array of bytes to be written to disk
Throws:
java.io.IOException

readData

public byte[] readData()
                throws java.io.IOException
Reads the entire contents of a disk file into a byte array.

Returns:
an array of bytes
Throws:
java.io.IOException

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.