Class CryptFilter

java.lang.Object
org.sejda.sambox.filter.Filter
org.sejda.sambox.filter.CryptFilter

final class CryptFilter extends Filter
Decrypts data encrypted by a security handler, reproducing the data as it was before encryption.
  • Constructor Details

    • CryptFilter

      CryptFilter()
  • Method Details

    • decode

      public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException
      Description copied from class: Filter
      Decodes data, producing the original non-encoded data.
      Specified by:
      decode in class Filter
      Parameters:
      encoded - the encoded byte stream
      decoded - the stream where decoded data will be written
      parameters - the parameters used for decoding
      index - the index to the filter being decoded
      Returns:
      repaired parameters dictionary, or the original parameters dictionary
      Throws:
      IOException - if the stream cannot be decoded
    • encode

      public void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException
      Description copied from class: Filter
      Encodes data.
      Specified by:
      encode in class Filter
      Parameters:
      input - the byte stream to encode
      encoded - the stream where encoded data will be written
      parameters - the parameters used for encoding
      Throws:
      IOException - if the stream cannot be encoded