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 voidclose()private voidcloseQuietly()(package private) java.lang.StringgetPath()voidwrite(com.google.protobuf.MessageLite message)Writes themessageto the destination.
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
-
write
public void write(com.google.protobuf.MessageLite message)
Description copied from interface:BinaryLogSinkWrites themessageto the destination.- Specified by:
writein interfaceBinaryLogSink
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
closeQuietly
private void closeQuietly()
-
-