src/main/java/com/aoindustries/io/buffer/SegmentedResult.java
private void append(int segmentIndex, int off, int len, StringBuilder buffer) {
		switch(segmentTypes[segmentIndex]) {
			case SegmentedWriter.TYPE_STRING :
				buffer.append(
					(String)segmentValues[segmentIndex],
					off,
					off + len
				);
				break;
			case SegmentedWriter.TYPE_CHAR_NEWLINE :
				assert off==0;
				assert len==1;
				buffer.append('\n');
				break;
			case SegmentedWriter.TYPE_CHAR_QUOTE :
				assert off==0;
				assert len==1;
				buffer.append('"');
				break;
			case SegmentedWriter.TYPE_CHAR_APOS :
				assert off==0;
				assert len==1;
				buffer.append('\'');
				break;
			case SegmentedWriter.TYPE_CHAR_OTHER :
				assert off==0;
				assert len==1;
				buffer.append(((Character)segmentValues[segmentIndex]).charValue());
				break;
			default :
				throw new AssertionError();
		}
	}
private void append(int segmentIndex, int off, int len, StringBuilder buffer) {
		switch(segmentTypes[segmentIndex]) {
			case SegmentedWriter.TYPE_STRING :
				buffer.append(
					(String)segmentValues[segmentIndex],
					off,
					off + len
				);
				break;
			case SegmentedWriter.TYPE_CHAR_NEWLINE :
				assert off==0;
				assert len==1;
				buffer.append('\n');
				break;
			case SegmentedWriter.TYPE_CHAR_QUOTE :
				assert off==0;
				assert len==1;
				buffer.append('"');
				break;
			case SegmentedWriter.TYPE_CHAR_APOS :
				assert off==0;
				assert len==1;
				buffer.append('\'');
				break;
			case SegmentedWriter.TYPE_CHAR_OTHER :
				assert off==0;
				assert len==1;
				buffer.append(((Character)segmentValues[segmentIndex]).charValue());
				break;
			default :
				throw new AssertionError();
		}
	}
private void append ( int segmentIndex , int off , int len , StringBuilder buffer ) { switch ( segmentTypes [ segmentIndex ] ) { case SegmentedWriter . TYPE_STRING : buffer . append ( ( String ) segmentValues [ segmentIndex ] , off , off + len ) ; break ; case SegmentedWriter . TYPE_CHAR_NEWLINE : assert off == 0 ; assert len == 1 ; buffer . append ( ' ' ) ; break ; case SegmentedWriter . TYPE_CHAR_QUOTE : assert off == 0 ; assert len == 1 ; buffer . append ( ' ' ) ; break ; case SegmentedWriter . TYPE_CHAR_APOS : assert off == 0 ; assert len == 1 ; buffer . append ( ' ' ) ; break ; case SegmentedWriter . TYPE_CHAR_OTHER : assert off == 0 ; assert len == 1 ; buffer . append ( ( ( Character ) segmentValues [ segmentIndex ] ) . charValue ( ) ) ; break ; default : throw new AssertionError ( ) ; } }
Appends the given range of a segment. to the buffer.
Appends the given range of a segment . to the buffer .