Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -3,15 +3,15 @@ import java.io.IOException;
|
|||
import java.nio.channels.FileChannel;
|
||||
|
||||
public class TruncFile {
|
||||
public static void main(String[] args) throws IOException{
|
||||
if(args.length < 2){
|
||||
System.out.println("Usage: java TruncFile fileName newSize");
|
||||
return;
|
||||
}
|
||||
//turn on "append" so it doesn't clear the file
|
||||
FileChannel outChan = new FileOutputStream(args[0], true).getChannel();
|
||||
long newSize = Long.parseLong(args[1]);
|
||||
outChan.truncate(newSize);
|
||||
outChan.close();
|
||||
}
|
||||
public static void main(String[] args) throws IOException{
|
||||
if(args.length < 2){
|
||||
System.out.println("Usage: java TruncFile fileName newSize");
|
||||
return;
|
||||
}
|
||||
//turn on "append" so it doesn't clear the file
|
||||
FileChannel outChan = new FileOutputStream(args[0], true).getChannel();
|
||||
long newSize = Long.parseLong(args[1]);
|
||||
outChan.truncate(newSize);
|
||||
outChan.close();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue