final int SegmentCount = 3; String text;  if (header) { text = printOptions.header; } else { text = printOptions.footer; } if (text == null) { return; } for (int i = 0; i < SegmentCount; i++) {
int segmentCount = 3; for (int i = 0; i < segmentCount; i++) {
	void printDecoration(int page, boolean header) {		int lastSegmentIndex = 0;		final int SegmentCount = 3;		String text;				if (header) {			text = printOptions.header;		}		else {			text = printOptions.footer;		}		if (text == null) {			return;		}		for (int i = 0; i < SegmentCount; i++) {			int segmentIndex = text.indexOf(StyledTextPrintOptions.SEPARATOR, lastSegmentIndex);			String segment;						if (segmentIndex == -1) {				segment = text.substring(lastSegmentIndex);				printDecorationSegment(segment, i, page, header);				break;			}			else {				segment = text.substring(lastSegmentIndex, segmentIndex);				printDecorationSegment(segment, i, page, header);				lastSegmentIndex = segmentIndex + StyledTextPrintOptions.SEPARATOR.length();			}		}	}