Fields Summary |
---|
public static final String | S_PROTOCOL_CAPTURE |
public static final String | S_DEVICE_AUDIO |
public static final String | S_DEVICE_VIDEO |
public static final String | S_DEVICE_RADIO |
public static final String | S_ENCODING |
public static final String | S_ENCODING_JPEG |
public static final String | S_ENCODING_PNG |
public static final String | S_ENCODING_PCM |
public static final String | S_TYPE |
public static final String | S_TYPE_JFIF |
public static final String | S_WIDTH |
public static final String | S_HEIGHT |
public static final String | S_QUALITY |
public static final String | S_PROGRESSIVE |
public static final String | S_INTERLACED |
public static final String | S_FPS |
public static final String | S_COLORS |
public static final String | S_JPEG |
public static final String | S_PNG |
public static final String | S_JFIF |
public static final String | S_TRUE |
public static final String | S_FALSE |
public static final String | S_AUDIO |
public static final String | S_VIDEO |
public static final String | S_RATE |
public static final String | S_BITS |
public static final String | S_CHANNELS |
public static final String | S_ENDIAN |
public static final String | S_ENDIAN_BIG |
public static final String | S_ENDIAN_LITTLE |
public static final String | S_SIGN |
public static final String | S_SIGN_SIGNED |
public static final String | S_SIGN_UNSIGNED |
public static final String | S_RADIO_FREQ |
public static final String | S_RADIO_MOD |
public static final String | S_RADIO_MOD_FM |
public static final String | S_RADIO_MOD_AM |
public static final String | S_RADIO_ST |
public static final String | S_RADIO_ST_MONO |
public static final String | S_RADIO_ST_STEREO |
public static final String | S_RADIO_ST_AUTO |
public static final String | S_RADIO_PRGID |
public static final String | S_RADIO_PRESET |
private String | locatorThe locator to be parsed |
private int | indexThe current pointer into the locator where parsing is to continue |
private int | lengthThe length of the locator |
private String | valueThe latest value in a "key=value" pair |
Methods Summary |
---|
public java.lang.String | getDevice()Parses and returns the device name part of the locator, if any.
if (index >= length)
return null;
int oldIndex = index;
// Get the index of the question mark
int queryIndex = locator.indexOf("?", index);
// If its not found, then the whole string is assumed to be the device
if (queryIndex < 0) {
index = length;
return locator.substring(oldIndex);
} else if (queryIndex == 0) {
return null;
}
// Otherwise move the index forward past the ?
index = queryIndex + 1;
// return the device name portion
return locator.substring(oldIndex, queryIndex);
|
public java.lang.String | getParameter()Parses and returns the next parameter key in a parameter
"key=value" pair.
if (index >= length)
return null;
int ampIndex = locator.indexOf("&", index);
// Assume last parameter
if (ampIndex < 0)
ampIndex = length;
// token = "abc=xyz"
String token = locator.substring(index, ampIndex);
int eq = token.indexOf("=");
// If there's no = or nothing before the = or nothing after the =
if (eq < 1 || eq == token.length() - 1)
return null;
String key = token.substring(0, eq);
// What's after the = is the value. Store it for later query thru
// the getValue() method
value = token.substring(eq + 1);
index = ampIndex + 1;
return key;
|
public java.lang.String | getProtocol()Parses and returns the protocol part of the locator, if any.
int colonIndex = locator.indexOf("://");
int oldIndex = index;
if (colonIndex < 1)
return null;
index = colonIndex + 3;
return locator.substring(oldIndex, colonIndex);
|
public java.lang.String | getValue()Returns the value corresponding to the most recently parsed parameter
return value;
|
public boolean | hasMore()Checks if there are any more characters in the string that haven't been
parsed yet.
return index < length;
|