java.lang.Object
org.apache.maven.surefire.api.stream.AbstractStreamDecoder<M,MT,ST>  
- Type Parameters:
- M- message object
- MT- enum describing the meaning of the message
- ST- enum for segment type
- All Implemented Interfaces:
- AutoCloseable
public abstract class AbstractStreamDecoder<M,MT extends Enum<MT>,ST extends Enum<ST>>  
extends Object
implements AutoCloseable
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionfinal classThis class avoids locking which gains the performance of this decoder.static final classfinal classstatic final classstatic enumUnderflow - could not completely read out al bytes in one call.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractStreamDecoder(ReadableByteChannel channel, ForkNodeArguments arguments, Map<AbstractStreamDecoder.Segment, MT> messageTypes) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcheckArguments(AbstractStreamDecoder<M, MT, ST>.Memento memento, int expectedDataElements) protected final voidcheckDelimiter(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected final voidcheckHeader(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected voiddebugStream(byte[] array, int position, int remaining) abstract Mprotected final ForkNodeArgumentsprotected abstract byte[]protected abstract ST[]nextSegmentType(MT messageType) protected final voidprintRemainingStream(AbstractStreamDecoder<M, MT, ST>.Memento memento) Print the last string which has not been finished by a new line character.protected AbstractStreamDecoder.StreamReadStatusprotected byteprotected CharsetreadCharset(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected intprotected IntegerreadInteger(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected Longprotected longreadLongPrivate(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected MTreadMessageType(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected AbstractStreamDecoder.SegmentreadSegment(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected StringreadString(AbstractStreamDecoder<M, MT, ST>.Memento memento) protected abstract MMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.AutoCloseableclose
- 
Field Details- 
BUFFER_SIZEpublic static final int BUFFER_SIZE- See Also:
 
 
- 
- 
Constructor Details- 
AbstractStreamDecoderprotected AbstractStreamDecoder(@Nonnull ReadableByteChannel channel, @Nonnull ForkNodeArguments arguments, @Nonnull Map<AbstractStreamDecoder.Segment, MT> messageTypes) 
 
- 
- 
Method Details- 
decodepublic abstract M decode(@Nonnull AbstractStreamDecoder<M, MT, throws MalformedChannelException, IOExceptionST>.Memento memento) - Throws:
- MalformedChannelException
- IOException
 
- 
getEncodedMagicNumber
- 
nextSegmentType
- 
toMessage
- 
getArguments
- 
debugStreamprotected void debugStream(byte[] array, int position, int remaining) 
- 
readMessageTypeprotected MT readMessageType(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readSegment@Nonnull protected AbstractStreamDecoder.Segment readSegment(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readCharset@Nonnull protected Charset readCharset(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readStringprotected String readString(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readIntegerprotected Integer readInteger(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readByteprotected byte readByte(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readIntprotected int readInt(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readLongprotected Long readLong(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
readLongPrivateprotected long readLongPrivate(@Nonnull AbstractStreamDecoder<M, MT, throws IOException, AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
checkDelimiterprotected final void checkDelimiter(AbstractStreamDecoder<M, MT, throws AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
checkHeaderprotected final void checkHeader(AbstractStreamDecoder<M, MT, throws AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento) 
- 
checkArgumentsprotected void checkArguments(AbstractStreamDecoder<M, MT, throws AbstractStreamDecoder.MalformedFrameExceptionST>.Memento memento, int expectedDataElements) 
- 
printRemainingStreamPrint the last string which has not been finished by a new line character.- Parameters:
- memento- current memento object
 
- 
read@Nonnull protected AbstractStreamDecoder.StreamReadStatus read(@Nonnull AbstractStreamDecoder<M, MT, throws IOExceptionST>.Memento memento, int recommendedCount) - Throws:
- IOException
 
 
-