public class FileSplitter extends Object
Modifier and Type | Field and Description |
---|---|
static int |
READ_AHEAD_BYTES |
static String |
SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static List<Long> |
scanToChunk(File from,
long chunkSizeBytes) |
static List<File> |
split(File from,
File targetDirectory,
String suffix,
long chunkSizeBytes)
Splits a file "pumaConcolor.txt" into the target directory using the suffix ("part") like so:
- pumaConcolor_part_0.txt
- pumaConcolor_part_1.txt
- pumaConcolor_part_2.txt
Returns the files parts
|
public static final String SEPARATOR
public static final int READ_AHEAD_BYTES
public static List<Long> scanToChunk(File from, long chunkSizeBytes) throws IOException
IOException
public static List<File> split(File from, File targetDirectory, String suffix, long chunkSizeBytes) throws IOException
IOException
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.