public class GeoPackageIOUtils extends Object
| Constructor and Description |
|---|
GeoPackageIOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyFile(File copyFrom,
File copyTo)
Copy a file to a file location
|
static void |
copyStream(InputStream copyFrom,
File copyTo)
Copy an input stream to a file location
|
static void |
copyStream(InputStream copyFrom,
File copyTo,
GeoPackageProgress progress)
Copy an input stream to a file location
|
static void |
copyStream(InputStream copyFrom,
OutputStream copyTo)
Copy an input stream to an output stream
|
static void |
copyStream(InputStream copyFrom,
OutputStream copyTo,
GeoPackageProgress progress)
Copy an input stream to an output stream
|
static byte[] |
fileBytes(File file)
Get the file bytes
|
static String |
formatBytes(long bytes)
Format the bytes into readable text
|
static String |
getFileExtension(File file)
Get the file extension
|
static String |
getFileNameWithoutExtension(File file)
Get the file name with the extension removed
|
static byte[] |
streamBytes(InputStream stream)
Get the stream bytes
|
public static String getFileExtension(File file)
file - public static String getFileNameWithoutExtension(File file)
file - public static void copyFile(File copyFrom, File copyTo) throws IOException
copyFrom - copyTo - IOExceptionpublic static void copyStream(InputStream copyFrom, File copyTo) throws IOException
copyFrom - copyTo - IOExceptionpublic static void copyStream(InputStream copyFrom, File copyTo, GeoPackageProgress progress) throws IOException
copyFrom - copyTo - progress - IOExceptionpublic static byte[] fileBytes(File file) throws IOException
file - IOExceptionpublic static byte[] streamBytes(InputStream stream) throws IOException
stream - IOExceptionpublic static void copyStream(InputStream copyFrom, OutputStream copyTo) throws IOException
copyFrom - copyTo - IOExceptionpublic static void copyStream(InputStream copyFrom, OutputStream copyTo, GeoPackageProgress progress) throws IOException
copyFrom - copyTo - progress - IOExceptionpublic static String formatBytes(long bytes)
bytes - Copyright © 2016 National Geospatial-Intelligence Agency. All rights reserved.