public class OutputFile extends Object implements AutoCloseable
| Constructor and Description |
|---|
OutputFile(File file) |
OutputFile(File file,
String compatibleVersion,
String[] options)
Create a new OutputFile.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the OutputFile, writing any necessary trailer information (such as a
checksum).
|
String |
getPath() |
PrintWriter |
getPrintWriter()
Return a PrintWriter object that may be used to write to this file.
|
String |
getToolName() |
boolean |
needToWrite() |
void |
setToolName(String toolName) |
public OutputFile(File file, String compatibleVersion, String[] options) throws IOException
file - the file to write to.compatibleVersion - the minimum compatible JavaCC version.options - if the file already exists, and cannot be overwritten, this is a
list of options (such s STATIC=false) to check for changes.IOExceptionpublic OutputFile(File file) throws IOException
IOException@WillCloseWhenClosed public PrintWriter getPrintWriter() throws IOException
PrintWriter to use.IOExceptionpublic void close()
close in interface AutoCloseablepublic String getToolName()
public void setToolName(String toolName)
toolName - the toolName to setpublic String getPath()
public boolean needToWrite()
Copyright © 2017–2019 Philip Helger. All rights reserved.