this.index = i + 1; int size = Math.max(1, this.index - this.mark); offsetInfo = new OffsetInfo(this.offset, size, delimiterSize); this.offset += size; if (startsWith != null) { int size = this.index - this.mark; if (size > 0) { offsetInfo = new OffsetInfo(this.offset, size, delimiterSize); this.offset += size; offsetInfo.setStartsWithMatch(false); } else { for (int i = 0; i < startsWith.length; i++) { byte sB = startsWith[i]; if (sB != data[i]) { offsetInfo.setStartsWithMatch(false); break;
long lastCrlfLength = 0; while ((offsetInfo = demarcator.nextOffsetInfo(startsWithFilter)) != null) { lastCrlfLength = offsetInfo.getCrlfLength(); if (startsWithFilter != null && !offsetInfo.isStartsWithMatch()) { if (offsetInfo.getCrlfLength() != -1) { previousOffsetInfo = offsetInfo; if (length + offsetInfo.getLength() > this.maxSplitSize) { throw new IllegalStateException( "Computing header resulted in header size being > MAX split size of " + this.maxSplitSize + "."); } else { length += offsetInfo.getLength(); actualLineCount++; if (actualLineCount == splitMaxLineCount) {
this.index = i + 1; int size = Math.max(1, this.index - this.mark); offsetInfo = new OffsetInfo(this.offset, size, delimiterSize); this.offset += size; if (startsWith != null) { int size = this.index - this.mark; if (size > 0) { offsetInfo = new OffsetInfo(this.offset, size, delimiterSize); this.offset += size; offsetInfo.setStartsWithMatch(false); } else { for (int i = 0; i < startsWith.length; i++) { byte sB = startsWith[i]; if (sB != data[i]) { offsetInfo.setStartsWithMatch(false); break;
length += remainderSplitInfo.remaningOffsetInfo.getLength(); actualLineCount++; long lastCrlfLength = 0; while ((offsetInfo = demarcator.nextOffsetInfo()) != null) { lastCrlfLength = offsetInfo.getCrlfLength(); if (offsetInfo.getLength() == offsetInfo.getCrlfLength()) { trailingCrlfLength += offsetInfo.getCrlfLength(); trailingLineCount++; } else if (offsetInfo.getLength() > offsetInfo.getCrlfLength()) { trailingCrlfLength = 0; // non-empty line came in, thus resetting counter if (length + offsetInfo.getLength() + startingLength > this.maxSplitSize) { if (length == 0) { // single line per split length += offsetInfo.getLength(); actualLineCount++; } else { length += offsetInfo.getLength(); actualLineCount++; if (splitMaxLineCount > 0 && actualLineCount >= splitMaxLineCount) {
long lastCrlfLength = 0; while ((offsetInfo = demarcator.nextOffsetInfo(startsWithFilter)) != null) { lastCrlfLength = offsetInfo.getCrlfLength(); if (startsWithFilter != null && !offsetInfo.isStartsWithMatch()) { if (offsetInfo.getCrlfLength() != -1) { previousOffsetInfo = offsetInfo; if (length + offsetInfo.getLength() > this.maxSplitSize) { throw new IllegalStateException( "Computing header resulted in header size being > MAX split size of " + this.maxSplitSize + "."); } else { length += offsetInfo.getLength(); actualLineCount++; if (actualLineCount == splitMaxLineCount) {
length += remainderSplitInfo.remaningOffsetInfo.getLength(); actualLineCount++; long lastCrlfLength = 0; while ((offsetInfo = demarcator.nextOffsetInfo()) != null) { lastCrlfLength = offsetInfo.getCrlfLength(); if (offsetInfo.getLength() == offsetInfo.getCrlfLength()) { trailingCrlfLength += offsetInfo.getCrlfLength(); trailingLineCount++; } else if (offsetInfo.getLength() > offsetInfo.getCrlfLength()) { trailingCrlfLength = 0; // non-empty line came in, thus resetting counter if (length + offsetInfo.getLength() + startingLength > this.maxSplitSize) { if (length == 0) { // single line per split length += offsetInfo.getLength(); actualLineCount++; } else { length += offsetInfo.getLength(); actualLineCount++; if (splitMaxLineCount > 0 && actualLineCount >= splitMaxLineCount) {