public class ThriftRuleKeyLogger extends Object implements AutoCloseable
Constructor and Description |
---|
ThriftRuleKeyLogger(OutputStream writer)
Creates a ThriftRuleKeyLogger
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the output stream
|
static ThriftRuleKeyLogger |
create(Path filename)
Create an instance of a logger that writes to the given file name
|
void |
write(com.facebook.buck.log.thrift.rulekeys.FullRuleKey ruleKey)
Writes a serialized form of the rule key to the output stream.
|
public ThriftRuleKeyLogger(OutputStream writer)
writer
- The stream to write serialized data topublic void close()
close
in interface AutoCloseable
public void write(com.facebook.buck.log.thrift.rulekeys.FullRuleKey ruleKey)
ruleKey
- The non-null ruleKey to write out to the iflepublic static ThriftRuleKeyLogger create(Path filename) throws IOException
An attempt is made to create all subdirectories before opening the file
filename
- The file to write thrift data toFileNotFoundException
- Thrown if the subdirectory containing the filename could not be
createdIOException