public abstract class AbstractLicenceAppender extends Object
Constructor and Description |
---|
AbstractLicenceAppender() |
Modifier and Type | Method and Description |
---|---|
void |
append(File document)
Append the default licence header to the supplied document.
|
protected String |
getFirstLine(int type)
Get the first line of the licence header formatted
for the given type of file.
|
protected String |
getLastLine(int type)
Get the last line of the licence header formatted
for the given type of file.
|
abstract String |
getLicenceHeader(File document)
Get the licence header for a document.
|
protected String |
getLine(int type,
String content)
Get a line of the licence header formatted
for the given type of file.
|
protected int |
getType(File document)
Detect the type of document.
|
void |
setForce(boolean b)
Set the force flag on this appender.
|
public void append(File document) throws IOException
document
- IOException
- if there is a problem either reading or writing the fileprotected int getType(File document)
document
- public void setForce(boolean b)
b
- public abstract String getLicenceHeader(File document)
protected String getFirstLine(int type)
type
- the type of file, see the TYPE_* constantsprotected String getLastLine(int type)
type
- the type of file, see the TYPE_* constantsCopyright © 2006–2013 Apache Software Foundation. All rights reserved.