Class AbstractStreamEncoder<E extends Enum<E>>
java.lang.Object
org.apache.maven.surefire.api.stream.AbstractStreamEncoder<E>
- Type Parameters:
E
- type of the message
The base class of stream encoder.
The type of message is expressed by opcode where the opcode object is described by the generic type
AbstractStreamEncoder
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(CharsetEncoder encoder, ByteBuffer result, E operation, String... messages) void
encode
(CharsetEncoder encoder, ByteBuffer result, E operation, RunMode runMode, Long testRunId, String... messages) void
encodeCharset
(ByteBuffer result) void
encodeHeader
(ByteBuffer result, E operation) void
encodeHeader
(ByteBuffer result, E operation, RunMode runMode, Long testRunId) void
encodeInteger
(ByteBuffer result, Integer i) void
encodeString
(CharsetEncoder encoder, ByteBuffer result, String string) protected abstract byte[]
enumToByteArray
(E e) int
estimateBufferLength
(int opcodeLength, RunMode runMode, CharsetEncoder encoder, int integersCounter, int longsCounter, String... strings) protected abstract Charset
protected abstract byte[]
protected abstract byte[]
protected abstract CharsetEncoder
protected void
write
(ByteBuffer frame, boolean sendImmediately)
-
Constructor Details
-
AbstractStreamEncoder
-
-
Method Details
-
getEncodedMagicNumber
-
enumToByteArray
-
getEncodedCharsetName
-
getCharset
-
newCharsetEncoder
-
write
- Throws:
IOException
-
encodeHeader
-
encodeHeader
-
encodeCharset
-
encodeString
-
encodeInteger
-
encode
public void encode(CharsetEncoder encoder, ByteBuffer result, E operation, RunMode runMode, Long testRunId, String... messages) -
encode
-
estimateBufferLength
public int estimateBufferLength(int opcodeLength, RunMode runMode, CharsetEncoder encoder, int integersCounter, int longsCounter, String... strings)
-