public class SerialUIDChanger extends Object implements RevisionHandler
Constructor and Description |
---|
SerialUIDChanger() |
Modifier and Type | Method and Description |
---|---|
static void |
binaryToKOML(String binary,
String koml)
converts a binary file into a KOML XML file
|
static void |
changeUID(long oldUID,
long newUID,
String fromFile,
String toFile)
changes the oldUID into newUID from the given file (binary/KOML) into the
other one (binary/KOML).
|
String |
getRevision()
Returns the revision string.
|
static boolean |
isKOML(String filename)
checks whether the given filename ends with ".koml"
|
static void |
komlToBinary(String koml,
String binary)
converts a KOML file into a binary one
|
static void |
main(String[] args)
exchanges an old UID for a new one.
|
public static boolean isKOML(String filename)
filename
- the filename to checkKOML.FILE_EXTENSION
public static void binaryToKOML(String binary, String koml) throws Exception
binary
- the binary file to convertkoml
- where to store the XML outputException
- if conversion failspublic static void komlToBinary(String koml, String binary) throws Exception
koml
- the filename with the XML databinary
- the name of theException
public static void changeUID(long oldUID, long newUID, String fromFile, String toFile) throws Exception
oldUID
- the old UID to changenewUID
- the new UID to usefromFile
- the original file with the old UIDtoFile
- the new file where to store the modified UIDException
- if conversion failspublic String getRevision()
getRevision
in interface RevisionHandler
public static void main(String[] args) throws Exception
args
- the command line parametersException
KOML.FILE_EXTENSION
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.