org.hudsonci.utils.io
Class FileBeheader
java.lang.Object
org.hudsonci.utils.io.FileBeheader
public class FileBeheader
- extends Object
Removes the beginning of a file.
- Since:
- 2.1.0
- Author:
- Jamie Whitehouse
|
Method Summary |
static File |
chop(File original,
long tailToKeep)
Beware, the original file is modified when chopping; you relinquish
all control of the original file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileBeheader
public FileBeheader()
chop
public static File chop(File original,
long tailToKeep)
- Beware, the original file is modified when chopping; you relinquish
all control of the original file.
Requires write access to the same directory as the original.
- Parameters:
original - the original filetailToKeep - the number of bytes to keep at the end of the file
- Returns:
- the original file chopped; for convenience
- Throws:
IllegalArgumentException - if original is a directory
IllegalStateException - if some error occurs; it's unreasonable to try and recover from this
Copyright © 2004-2012 Hudson. All Rights Reserved.