Class 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 using MessageLite.writeDelimitedTo(OutputStream).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean closed  
      private static java.util.logging.Logger logger  
      private java.io.OutputStream out  
      private java.lang.String outPath  
    • 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 the message to the destination.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • outPath

        private final java.lang.String outPath
      • out

        private final java.io.OutputStream out
      • closed

        private boolean closed
    • Constructor Detail

      • TempFileSink

        TempFileSink()
              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getPath

        java.lang.String getPath()
      • write

        public void write​(com.google.protobuf.MessageLite message)
        Description copied from interface: BinaryLogSink
        Writes the message to the destination.
        Specified by:
        write in interface BinaryLogSink
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • closeQuietly

        private void closeQuietly()