FileDocCategorySizeDatePackage
LineTokenizer.javaAPI DocAndroid 5.1 API1728Thu Mar 12 22:22:08 GMT 2015android.alsa

LineTokenizer

public class LineTokenizer extends Object
hide
Breaks lines in an ALSA "cards" or "devices" file into tokens. TODO(pmclean) Look into replacing this with String.split().

Fields Summary
public static final int
kTokenNotFound
private String
mDelimiters
Constructors Summary
public LineTokenizer(String delimiters)


       
        mDelimiters = delimiters;
    
Methods Summary
intnextDelimiter(java.lang.String line, int startIndex)

        int len = line.length();
        int offset = startIndex;
        for (; offset < len; offset++) {
            if (mDelimiters.indexOf(line.charAt(offset)) != -1) {
                // past a delimiter
                break;
            }
        }

      return offset < len ? offset : kTokenNotFound;
    
intnextToken(java.lang.String line, int startIndex)

        int len = line.length();
        int offset = startIndex;
        for (; offset < len; offset++) {
            if (mDelimiters.indexOf(line.charAt(offset)) == -1) {
                // past a delimiter
                break;
            }
      }

      return offset < len ? offset : kTokenNotFound;