Class Utf8RecodingDeferredFileOutputStream
- java.lang.Object
-
- org.apache.maven.plugin.surefire.report.Utf8RecodingDeferredFileOutputStream
-
final class Utf8RecodingDeferredFileOutputStream extends java.lang.ObjectA deferred file output stream decorator that recodes the bytes written into the stream from the VM default encoding to UTF-8.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBuffercachestatic intCACHE_SIZEprivate java.lang.Stringchannelprivate booleanclosedprivate java.nio.file.Pathfileprivate booleanisDirtyprivate java.lang.ref.SoftReference<byte[]>largeCacheprivate static byte[]NL_BYTESprivate java.io.RandomAccessFilestorage
-
Constructor Summary
Constructors Constructor Description Utf8RecodingDeferredFileOutputStream(java.lang.String channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfree()longgetByteCount()private byte[]getLargeCache(int minLength)private voidsync()voidwrite(java.lang.String output, boolean newLine)voidwriteTo(java.io.OutputStream out)
-
-
-
Field Detail
-
NL_BYTES
private static final byte[] NL_BYTES
-
CACHE_SIZE
public static final int CACHE_SIZE
- See Also:
- Constant Field Values
-
channel
private final java.lang.String channel
-
file
private java.nio.file.Path file
-
storage
private java.io.RandomAccessFile storage
-
closed
private boolean closed
-
largeCache
private java.lang.ref.SoftReference<byte[]> largeCache
-
cache
private java.nio.ByteBuffer cache
-
isDirty
private boolean isDirty
-
-
Method Detail
-
write
public void write(java.lang.String output, boolean newLine) throws java.io.IOException- Throws:
java.io.IOException
-
getByteCount
public long getByteCount()
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
free
public void free()
-
sync
private void sync() throws java.io.IOException- Throws:
java.io.IOException
-
getLargeCache
private byte[] getLargeCache(int minLength)
-
-