Package io.grpc.protobuf.services
Class TempFileSink
- java.lang.Object
-
- io.grpc.protobuf.services.TempFileSink
-
- All Implemented Interfaces:
BinaryLogSink
,java.io.Closeable
,java.lang.AutoCloseable
class TempFileSink extends java.lang.Object implements BinaryLogSink
The output file goes to the JVM's temp dir with a prefix of BINARY_INFO. The proto messages are written serially usingMessageLite.writeDelimitedTo(OutputStream)
.
-
-
Constructor Summary
Constructors Constructor Description TempFileSink()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private void
closeQuietly()
(package private) java.lang.String
getPath()
void
write(com.google.protobuf.MessageLite message)
Writes themessage
to the destination.
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
-
write
public void write(com.google.protobuf.MessageLite message)
Description copied from interface:BinaryLogSink
Writes themessage
to the destination.- Specified by:
write
in interfaceBinaryLogSink
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
closeQuietly
private void closeQuietly()
-
-