private static char charAt ( byte type , Object value , int charIndex ) { switch ( type ) { case SegmentedWriter . TYPE_STRING : return ( ( String ) value ) . charAt ( charIndex ) ; case SegmentedWriter . TYPE_CHAR_NEWLINE : assert charIndex == 0 ; return ' ' ; case SegmentedWriter . TYPE_CHAR_QUOTE : assert charIndex == 0 ; return ' ' ; case SegmentedWriter . TYPE_CHAR_APOS : assert charIndex == 0 ; return ' ' ; case SegmentedWriter . TYPE_CHAR_OTHER : assert charIndex == 0 ; return ( Character ) value ; default : throw new AssertionError ( ) ; } }
Gets the character at the given index in a segment . This is the absolute index the offset is not added - in .