MCPcopy Create free account
hub / github.com/apache/orc / OutStream

Method OutStream

java/core/src/java/org/apache/orc/impl/OutStream.java:75–95  ·  view source on GitHub ↗
(Object name,
                   StreamOptions options,
                   PhysicalWriter.OutputReceiver receiver)

Source from the content-addressed store, hash-verified

73 private final byte[] iv;
74
75 public OutStream(Object name,
76 StreamOptions options,
77 PhysicalWriter.OutputReceiver receiver) {
78 this.name = name;
79 this.bufferSize = options.getBufferSize();
80 this.codec = options.getCodec();
81 this.options = options.getCodecOptions();
82 this.receiver = receiver;
83 if (options.isEncrypted()) {
84 this.cipher = options.getAlgorithm().createCipher();
85 this.key = options.getKey();
86 this.iv = options.getIv();
87 resetState();
88 } else {
89 this.cipher = null;
90 this.key = null;
91 this.iv = null;
92 }
93 LOG.debug("Stream {} written to with {}", name, options);
94 logKeyAndIv(name, key, iv);
95 }
96
97 static void logKeyAndIv(Object name, Key key, byte[] iv) {
98 if (iv != null && KEY_LOGGER.isDebugEnabled()) {

Callers

nothing calls this directly

Calls 10

resetStateMethod · 0.95
logKeyAndIvMethod · 0.95
getCodecOptionsMethod · 0.80
isEncryptedMethod · 0.80
createCipherMethod · 0.80
getAlgorithmMethod · 0.65
getBufferSizeMethod · 0.45
getCodecMethod · 0.45
getKeyMethod · 0.45
getIvMethod · 0.45

Tested by

no test coverage detected