Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.storage.sql
Class XORBinaryManager.XORBinaryScrambler

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.XORBinaryManager.XORBinaryScrambler
All Implemented Interfaces:
BinaryScrambler
Enclosing class:
XORBinaryManager

public static class XORBinaryManager.XORBinaryScrambler
extends java.lang.Object
implements BinaryScrambler

A BinaryScrambler that does an XOR with the given pattern.


Constructor Summary
XORBinaryManager.XORBinaryScrambler(byte[] pattern)
           
 
Method Summary
 Binary getUnscrambledBinary(java.io.File file, java.lang.String digest, java.lang.String repoName)
          Gets an unscrambled Binary for the given file.
 void reset()
          Reset scrambling from start.
 void scrambleBuffer(byte[] buf, int off, int n)
          Scramble a buffer at the given offset for n bytes.
 void skip(long n)
          Skips n bytes during unscrambling.
 void unscrambleBuffer(byte[] buf, int off, int n)
          Unscramble a buffer at the given offset for n bytes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XORBinaryManager.XORBinaryScrambler

public XORBinaryManager.XORBinaryScrambler(byte[] pattern)
Method Detail

scrambleBuffer

public void scrambleBuffer(byte[] buf,
                           int off,
                           int n)
Description copied from interface: BinaryScrambler
Scramble a buffer at the given offset for n bytes.

Specified by:
scrambleBuffer in interface BinaryScrambler

unscrambleBuffer

public void unscrambleBuffer(byte[] buf,
                             int off,
                             int n)
Description copied from interface: BinaryScrambler
Unscramble a buffer at the given offset for n bytes.

Specified by:
unscrambleBuffer in interface BinaryScrambler

getUnscrambledBinary

public Binary getUnscrambledBinary(java.io.File file,
                                   java.lang.String digest,
                                   java.lang.String repoName)
Description copied from interface: BinaryScrambler
Gets an unscrambled Binary for the given file.

Specified by:
getUnscrambledBinary in interface BinaryScrambler

skip

public void skip(long n)
Description copied from interface: BinaryScrambler
Skips n bytes during unscrambling.

Specified by:
skip in interface BinaryScrambler

reset

public void reset()
Description copied from interface: BinaryScrambler
Reset scrambling from start.

Specified by:
reset in interface BinaryScrambler

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.