WDYSEncrypt
Class WDYSEncryptedFileWriter

java.lang.Object
  extended byWDYSEncrypt.WDYSEncryptedFileWriter

public class WDYSEncryptedFileWriter
extends Object

This class writes encrypted WDYS files, including a correct header and data padding.

Version:
1
Author:
Berend "Kirk" Wouda

Field Summary
protected  BufferedOutputStream writer
          The writer.
 
Constructor Summary
WDYSEncryptedFileWriter(String filename, long length)
          Constructs a new file writer around the given file.
 
Method Summary
 void close()
          Closes the file.
 void write8EncryptedDataBytes(byte[] octet)
          Writes the next 8 bytes to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected BufferedOutputStream writer
The writer. Well it's a stream actually.

Constructor Detail

WDYSEncryptedFileWriter

public WDYSEncryptedFileWriter(String filename,
                               long length)
                        throws IOException
Constructs a new file writer around the given file.

Parameters:
filename - The name of the encrypted file.
length - The length of the decypted data file, which we need for storing.
Method Detail

close

public void close()
           throws IOException
Closes the file.

Throws:
IOException - When IO stuff goes wrong.

write8EncryptedDataBytes

public void write8EncryptedDataBytes(byte[] octet)
                              throws IOException
Writes the next 8 bytes to the file.

Parameters:
octet - The next 8 bytes to be written.
Throws:
IOException - When IO stuff goes wrong.