private void writeSegment(int segmentIndex, int off, int len, Encoder encoder, Writer out) throws IOException {
    """
	Writes the given range of a segment to the given writer using the given encoder.
    """
		switch(segmentTypes[segmentIndex]) {
			case SegmentedWriter.TYPE_STRING :
				encoder.write(
					(String)segmentValues[segmentIndex],
					off,
					len,
					out
				);
				break;
			case SegmentedWriter.TYPE_CHAR_NEWLINE :
				assert off==0;
				assert len==1;
				encoder.write('\n', out);
				break;
			case SegmentedWriter.TYPE_CHAR_QUOTE :
				assert off==0;
				assert len==1;
				encoder.write('"', out);
				break;
			case SegmentedWriter.TYPE_CHAR_APOS :
				assert off==0;
				assert len==1;
				encoder.write('\'', out);
				break;
			case SegmentedWriter.TYPE_CHAR_OTHER :
				assert off==0;
				assert len==1;
				encoder.write((Character)segmentValues[segmentIndex], out);
				break;
			default :
				throw new AssertionError();
		}
	}
private void writeSegment(int segmentIndex, int off, int len, Encoder encoder, Writer out) throws IOException {
		switch(segmentTypes[segmentIndex]) {
			case SegmentedWriter.TYPE_STRING :
				encoder.write(
					(String)segmentValues[segmentIndex],
					off,
					len,
					out
				);
				break;
			case SegmentedWriter.TYPE_CHAR_NEWLINE :
				assert off==0;
				assert len==1;
				encoder.write('\n', out);
				break;
			case SegmentedWriter.TYPE_CHAR_QUOTE :
				assert off==0;
				assert len==1;
				encoder.write('"', out);
				break;
			case SegmentedWriter.TYPE_CHAR_APOS :
				assert off==0;
				assert len==1;
				encoder.write('\'', out);
				break;
			case SegmentedWriter.TYPE_CHAR_OTHER :
				assert off==0;
				assert len==1;
				encoder.write((Character)segmentValues[segmentIndex], out);
				break;
			default :
				throw new AssertionError();
		}
	}
private void writeSegment ( int segmentIndex , int off , int len , Encoder encoder , Writer out ) throws IOException { switch ( segmentTypes [ segmentIndex ] ) { case SegmentedWriter . TYPE_STRING : encoder . write ( ( String ) segmentValues [ segmentIndex ] , off , len , out ) ; break ; case SegmentedWriter . TYPE_CHAR_NEWLINE : assert off == 0 ; assert len == 1 ; encoder . write ( ' ' , out ) ; break ; case SegmentedWriter . TYPE_CHAR_QUOTE : assert off == 0 ; assert len == 1 ; encoder . write ( ' ' , out ) ; break ; case SegmentedWriter . TYPE_CHAR_APOS : assert off == 0 ; assert len == 1 ; encoder . write ( ' ' , out ) ; break ; case SegmentedWriter . TYPE_CHAR_OTHER : assert off == 0 ; assert len == 1 ; encoder . write ( ( Character ) segmentValues [ segmentIndex ] , out ) ; break ; default : throw new AssertionError ( ) ; } }
Writes the given range of a segment to the given writer using the given encoder.
Writes the given range of a segment to the given writer using the given encoder .