org.freehep.util.io
Class EEXECEncryption

java.lang.Object
  extended by java.io.OutputStream
      extended by org.freehep.util.io.EEXECEncryption
All Implemented Interfaces:
Closeable, Flushable, EEXECConstants

public class EEXECEncryption
extends OutputStream
implements EEXECConstants

Encrypts using the EEXEC form (Used by Type 1 fonts).

Version:
$Id: EEXECEncryption.java 8584 2006-08-10 23:06:37Z duns $
Author:
Simon Fischer

Field Summary
 
Fields inherited from interface org.freehep.util.io.EEXECConstants
C1, C2, CHARSTRING_R, EEXEC_R, N
 
Constructor Summary
EEXECEncryption(OutputStream out)
          Creates an EEXECEncryption from given stream.
EEXECEncryption(OutputStream out, int r)
          Creates an EEXECEncryption from given stream.
EEXECEncryption(OutputStream out, int r, int n)
          Creates an EEXECEncryption from given stream.
 
Method Summary
 void close()
           
static int[] encryptString(int[] chars, int r, int n)
          Encrypt array of characters.
 void flush()
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EEXECEncryption

public EEXECEncryption(OutputStream out)
Creates an EEXECEncryption from given stream.

Parameters:
out - stream to write

EEXECEncryption

public EEXECEncryption(OutputStream out,
                       int r)
Creates an EEXECEncryption from given stream.

Parameters:
out - stream to write
r -

EEXECEncryption

public EEXECEncryption(OutputStream out,
                       int r,
                       int n)
Creates an EEXECEncryption from given stream.

Parameters:
out - stream to write
r -
n -
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException

encryptString

public static int[] encryptString(int[] chars,
                                  int r,
                                  int n)
                           throws IOException
Encrypt array of characters.

Parameters:
chars - int array to encrypt
r -
n -
Returns:
encrypted array
Throws:
IOException - if write fails (never happens)


Copyright © 2000-2007 FreeHEP. All Rights Reserved.