public static byte evaluateDelimiter ( String inputDelimiter ) { if ( inputDelimiter . length ( ) == 1 ) { return inputDelimiter . getBytes ( ) [ 0 ] ; } else if ( inputDelimiter . length ( ) > 1 && inputDelimiter . charAt ( 0 ) == ' ' ) { switch ( inputDelimiter . charAt ( 1 ) ) { case ' ' : return ( byte ) ' ' ; case ' ' : case ' ' : return Integer . valueOf ( inputDelimiter . substring ( 2 ) ) . byteValue ( ) ; default : throw new IllegalArgumentException ( "Unknown delimiter " + inputDelimiter ) ; } } else { throw new IllegalArgumentException ( "LzoTokenizedStorage delimeter must be a single character" ) ; } }
Parse an input delimiter string as with PigStorage and return the byte it represents .