Class Channels
- java.lang.Object
-
- org.apache.maven.surefire.api.util.internal.Channels
-
public final class Channels extends Object
ConvertsOutputStream
,PrintStream
,InputStream
to the JavaChannel
.
We do not use the Java's utility classChannels
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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReadableByteChannel
newBufferedChannel(InputStream is)
static WritableBufferedByteChannel
newBufferedChannel(OutputStream out)
static ReadableByteChannel
newChannel(InputStream is)
static WritableByteChannel
newChannel(OutputStream out)
static InputStream
newInputStream(AsynchronousByteChannel channel)
static OutputStream
newOutputStream(AsynchronousByteChannel channel)
-
-
-
Method Detail
-
newChannel
public static WritableByteChannel newChannel(@Nonnull OutputStream out)
-
newBufferedChannel
public static WritableBufferedByteChannel newBufferedChannel(@Nonnull OutputStream out)
-
newChannel
public static ReadableByteChannel newChannel(@Nonnull InputStream is)
-
newBufferedChannel
public static ReadableByteChannel newBufferedChannel(@Nonnull InputStream is)
-
newOutputStream
public static OutputStream newOutputStream(AsynchronousByteChannel channel)
-
newInputStream
public static InputStream newInputStream(AsynchronousByteChannel channel)
-
-