Class Channels
java.lang.Object
org.apache.maven.surefire.api.util.internal.Channels
Converts
We do not use the Java's utility class
OutputStream
, PrintStream
, InputStream
to the Java Channel
.
We do not use the Java's utility class
Channels
because the utility closes the stream as
soon as the particular Thread is interrupted. If the frameworks (Zookeeper, Netty) interrupts the thread, the
communication channels become closed and the JVM hangs. Therefore we developed internal utility which is safe for the
Surefire.- Since:
- 3.0.0-M5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadableByteChannel
static WritableBufferedByteChannel
static ReadableByteChannel
private static ReadableByteChannel
newChannel
(InputStream is, int bufferSize) static WritableByteChannel
newChannel
(OutputStream out) private static WritableBufferedByteChannel
newChannel
(OutputStream out, int bufferSize) static InputStream
newInputStream
(AsynchronousByteChannel channel) static OutputStream
newOutputStream
(AsynchronousByteChannel channel)
-
Field Details
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
-
Constructor Details
-
Channels
private Channels()
-
-
Method Details
-
newChannel
-
newBufferedChannel
-
newChannel
-
newBufferedChannel
-
newOutputStream
-
newInputStream
-
newChannel
-
newChannel
private static WritableBufferedByteChannel newChannel(@Nonnull OutputStream out, @Nonnegative int bufferSize)
-