Package jpigpio
Class FileIO
java.lang.Object
jpigpio.FileIO
public class FileIO
extends java.lang.Object
A helper class for some simple file I/O activities.
-
Constructor Summary
Constructors Constructor Description FileIO(java.io.File file)
Constructor to create a wrapper to the file. -
Method Summary
-
Constructor Details
-
FileIO
public FileIO(java.io.File file)Constructor to create a wrapper to the file.- Parameters:
file
- The file to be accessed.
-
-
Method Details
-
read
public byte[] read(int size) throws java.io.IOExceptionRead up tosize
bytes from the file.- Parameters:
size
- The maximum size of data to return- Returns:
- An array of data. It may be zero length if there is no data available.
- Throws:
java.io.IOException
- on IO Exception :-)
-
close
public void close() throws java.io.IOExceptionClose the file.- Throws:
java.io.IOException
- on IO Exception :-)
-