DCT Lightfoot v3 API specification

com.dctl.hardware.flash
Class FlashFileOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--com.dctl.hardware.flash.FlashFileOutputStream
All Implemented Interfaces:
Writable

public class FlashFileOutputStream
extends OutputStream

Flash file output stream that allows output operations to take place on a flash file


Constructor Summary
FlashFileOutputStream(FlashFile file)
          Create a new Output stream from a file
FlashFileOutputStream(FlashFile file, boolean append)
          Create a new Output stream from a file
FlashFileOutputStream(java.lang.String name)
          Create a new Output stream from a file
FlashFileOutputStream(java.lang.String name, boolean append)
          Create a new Output stream from a file
 
Method Summary
 void close()
          Close the file
 void write(byte[] buf, int offset, int length)
          Write from a buffer to the file
 void write(int b)
          Write a byte to the file
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlashFileOutputStream

public FlashFileOutputStream(FlashFile file)
                      throws IOException
Create a new Output stream from a file

Parameters:
file - The flash file
Throws:
IOException - if there is an error creatOutg the file

FlashFileOutputStream

public FlashFileOutputStream(java.lang.String name)
                      throws IOException
Create a new Output stream from a file

Parameters:
name - The name of the file
Throws:
IOException - if there is an error creatOutg the file

FlashFileOutputStream

public FlashFileOutputStream(FlashFile file,
                             boolean append)
                      throws IOException
Create a new Output stream from a file

Parameters:
file - The flash file
append - True to append
Throws:
IOException - if there is an error creatOutg the file

FlashFileOutputStream

public FlashFileOutputStream(java.lang.String name,
                             boolean append)
                      throws IOException
Create a new Output stream from a file

Parameters:
name - The name of the file
append - True to append
Throws:
IOException - if there is an error creatOutg the file
Method Detail

close

public void close()
Close the file

Overrides:
close in class OutputStream

write

public void write(int b)
           throws IOException
Write a byte to the file

Specified by:
write in interface Writable
Specified by:
write in class OutputStream
Parameters:
b - The byte
Throws:
IOException - if there is an error

write

public void write(byte[] buf,
                  int offset,
                  int length)
           throws IOException
Write from a buffer to the file

Specified by:
write in interface Writable
Overrides:
write in class OutputStream
Parameters:
buf - The buffer
offset - The offset into the buffer
length - The number of bytes to write
Returns:
the number of bytes written
Throws:
IOException - if there is an error

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification