|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.camelspotting.jotl.parsing.ParseUtil
public final class ParseUtil
This is a class of static parse support methods, so no methods are visible to applications using jOpenTTDLib.
Method Summary | |
---|---|
static int |
locateNextZero(byte[] data,
int offset)
Finds first zero from offset. |
static Server |
parseHost(String host,
int port)
This method checks if host is an IP-address via regex and parses it or if not, does a DNS look up on it. |
static String |
parseString(byte[] data,
int offset,
int length)
Method for parsing contents of offset byte array to offset String . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int locateNextZero(byte[] data, int offset)
data
- the array to checkoffset
- where to start
public static String parseString(byte[] data, int offset, int length)
String
.
data
- the byte array to read fromoffset
- where to startlength
- where to finish
String
public static Server parseHost(String host, int port) throws IllegalHostException
host
- the hostname or IP
InetAddress
-object
UnknownHostException
IllegalHostException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |