public class EDIFTokenizer
extends Object
implements AutoCloseable
BufferedInputStream
should be avoided.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_TOKEN_LENGTH |
Constructor and Description |
---|
EDIFTokenizer(Path fileName,
InputStream in,
StringPool uniquifier) |
EDIFTokenizer(Path fileName,
InputStream in,
StringPool uniquifier,
int maxTokenLength) |
Modifier and Type | Method and Description |
---|---|
static String |
byteArrayToStringMulti(byte[] buffer,
int start1,
int length1,
int start2,
int length2)
Read two separate locations from a buffer, concatenating them into a single string.
|
void |
close() |
long |
getByteOffset() |
Path |
getFileName() |
com.xilinx.rapidwright.edif.EDIFToken |
getOptionalNextToken(boolean isShortLived)
Get the next token object
|
String |
getOptionalNextTokenString(boolean isShortLived)
Get the next token string
|
StringPool |
getUniquifier() |
void |
skip(long i)
Skip ahead by some offset.
|
public static final int DEFAULT_MAX_TOKEN_LENGTH
public EDIFTokenizer(Path fileName, InputStream in, StringPool uniquifier, int maxTokenLength)
public EDIFTokenizer(Path fileName, InputStream in, StringPool uniquifier)
public static String byteArrayToStringMulti(byte[] buffer, int start1, int length1, int start2, int length2)
buffer
- the buffer to read fromstart1
- first part startlength1
- first part lengthstart2
- second part startlength2
- second part lengthpublic com.xilinx.rapidwright.edif.EDIFToken getOptionalNextToken(boolean isShortLived)
isShortLived
- skip uniquifying if truepublic String getOptionalNextTokenString(boolean isShortLived)
isShortLived
- skip uniquifying if truepublic Path getFileName()
public void close() throws IOException
close
in interface AutoCloseable
IOException
public void skip(long i)
i
- offset to advance bypublic StringPool getUniquifier()
public long getByteOffset()