|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutilities.DescriptorsIO
public class DescriptorsIO
Utility class for various Descriptor IO operations.
Constructor Summary | |
---|---|
DescriptorsIO()
|
Method Summary | |
---|---|
static void |
binaryToText(java.lang.String descriptorsFolder,
java.lang.String descriptorType,
int descriptorLength)
Takes a folder with descriptor files in binary format and converts them to text. |
static void |
main(java.lang.String[] args)
|
static java.util.ArrayList<double[]> |
readBinary(java.lang.String descriptorsFileName,
int descriptorLength)
Reads descriptors from a binary file and returns them in an ArrayList |
static java.util.ArrayList<double[]> |
readText(java.lang.String descriptorsFileName,
int descriptorLength)
Reads descriptors from a text file and returns them in an ArrayList |
static void |
textToBinary(java.lang.String descriptorsFolder,
java.lang.String descriptorType,
int descriptorLength)
Takes a folder with descriptor files in text format and converts them to binary. |
static void |
writeBinary(java.lang.String descriptorsFileName,
double[][] descriptors)
Takes a two-dimensional double array with descriptors and writes them in a binary file. |
static void |
writeText(java.lang.String descriptorsFileName,
double[][] descriptors)
Takes a two-dimensional double array with descriptors and writes them in a comma separated text file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DescriptorsIO()
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static java.util.ArrayList<double[]> readBinary(java.lang.String descriptorsFileName, int descriptorLength) throws java.lang.Exception
descriptorsFileName
- The binary file containing the descriptors.descriptorLength
- The length of each descriptor.
java.lang.Exception
public static java.util.ArrayList<double[]> readText(java.lang.String descriptorsFileName, int descriptorLength) throws java.lang.Exception
descriptorsFileName
- The text file containing the descriptors.descriptorLength
- The length of each descriptor.
java.lang.Exception
public static void writeBinary(java.lang.String descriptorsFileName, double[][] descriptors) throws java.lang.Exception
descriptorsFileName
- The binary file's name.descriptors
- The descriptors.
java.lang.Exception
public static void writeText(java.lang.String descriptorsFileName, double[][] descriptors) throws java.lang.Exception
descriptorsFileName
- The text file's name.descriptors
- The descriptors.
java.lang.Exception
public static void textToBinary(java.lang.String descriptorsFolder, java.lang.String descriptorType, int descriptorLength) throws java.lang.Exception
descriptorsFolder
- descriptorType
- descriptorLength
-
java.lang.Exception
public static void binaryToText(java.lang.String descriptorsFolder, java.lang.String descriptorType, int descriptorLength) throws java.lang.Exception
descriptorsFolder
- descriptorType
- descriptorLength
-
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |