public static long parseSegment ( Name name , byte marker ) throws EncodingException { if ( name . size ( ) == 0 ) { throw new EncodingException ( "No components to parse." ) ; } return name . get ( - 1 ) . toNumberWithMarker ( marker ) ; }
Retrieve the segment number from the last component of a name .