XCMS Toolkit

jtools
Class DataFile

java.lang.Object
  extended by jtools.DataFile

public class DataFile
extends java.lang.Object

Provides a meachanism for manipulating data in a disk file.

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

Constructor Summary
DataFile(java.lang.String fileName)
          Constructor for DataFile, with a parameter that specifies the disk file where data is to be read from or written to.
 
Method Summary
 byte[] readAll()
          Reads the entire contents of a disk file into a byte array.
 void writeAll(byte[] bytes)
          Writes an entire byte array to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFile

public DataFile(java.lang.String fileName)
         throws java.io.IOException
Constructor for DataFile, with a parameter that specifies the disk file where data is to be read from or written to.

Parameters:
fileName - a file name path string
Throws:
java.io.IOException
Method Detail

readAll

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

Throws:
java.io.IOException

writeAll

public void writeAll(byte[] bytes)
              throws java.io.IOException
Writes an entire byte array to disk.

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

XCMS Toolkit


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