Package google.registry.rde
Class RydeEncoder
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
google.registry.rde.RydeEncoder
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Stream that performs the full RyDE encryption.
The RyDE format has 2 files:
- the "data" file, encoded in data -> tar -> PgpFile -> compression -> encryption
- the signature of the resulting file
Hence, the encoder needs to receive 2 OutputStreams - one for the data and one for the signature.
Because of the external tar file encoding - the encoder must know the total length of the data from the start. This is a bit annoying, but necessary.
-
Nested Class Summary
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Method Summary
Methods inherited from class java.io.FilterOutputStream
flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Method Details
-
write
Call the underlying 3 input write.FilterInputStream implements the 3 input write using a for loop over the single-byte write. For efficiency reasons, we want it to use the 3 input write instead.
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-