Marks the curent written data as the end of a chunk. This chunk can then be skipped when reading.
961153
public void endChunk () {
		flush();
		if (TRACE) trace("kryo", "End chunk.");
		try {
			getOutputStream().write(0); // Zero length chunk.
		} catch (IOException ex) {
			throw new KryoException(ex);
		}
	}
1347483
private void completeWrite(Write write) {
        Timer t = write.complete();
        if (t != null) {
            this.metrics.bookKeeperWriteCompleted(write.data.getLength(), t.getElapsed());
        }
    }
1325314
private void endMainBlock() {
        BlockTabRec btr = blockTab[0];
        btr.tPosContentsEnd = templateText.length();
        btr.tPosEnd = templateText.length();
        btr.definitionIsOpen = false;
        currentNestingLevel--;
    }
95354
public void endObject() throws IOException {
    int p = peeked;
    if (p == PEEKED_NONE) {
      p = doPeek();
    }
    if (p == PEEKED_END_OBJECT) {
      stackSize--;
      pathNames[stackSize] = null; // Free the last path name so that it can be garbage collected!
      pathIndices[stackSize - 1]++;
      peeked = PEEKED_NONE;
    } else {
      throw new IllegalStateException("Expected END_OBJECT but was " + peek()
          + " at line " + getLineNumber() + " column " + getColumnNumber() + " path " + getPath());
    }
  }
806506
private void skipToEndOfLine() throws IOException {
        while (pos < limit || fillBuffer(1)) {
            char c = buffer[pos++];
            if (c == '\r' || c == '\n') {
                break;
            }
        }
    }
638706
public void mark(int readlimit) {
        abortIfNeeded();
        if (log.isDebugEnabled()) {
            log.debug("Input stream marked at " + bytesReadPastMark + " bytes");
        }
        if (bytesReadPastMark <= bufferSize && buffer != null) {
            /*
             * Clear buffer of already-read data to make more space. It's safe
             * to cast bytesReadPastMark to an int because it is known to be
             * less than bufferSize, which is an int.
             */
            byte[] newBuffer = new byte[this.bufferSize];
            System.arraycopy(buffer, bufferOffset, newBuffer, 0, (int)(bytesReadPastMark - bufferOffset));
            this.buffer = newBuffer;
            this.bytesReadPastMark -= bufferOffset;
            this.bufferOffset = 0;
        } else {
            // If mark is called after the buffer was already exceeded, create a new buffer.
            this.bufferOffset = 0;
            this.bytesReadPastMark = 0;
            this.buffer = new byte[this.bufferSize];
        }
    }
1289722
public void end() {
		// if (((ArrayList) this.featureCollection).size() == 0) {
		this.endNewElement();
		// }
		contentHandler.endFeatureCollection(this.featureCollection);
		if (writerContentHandler != null)
			geoJSON = writerContentHandler.endFeatureCollection(geoJSON);
	}
521481
public void finish() throws IOException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        { // 306998.15
            Tr.debug(tc, "finish");
        }

        if (length == -1 && total != 0)
            length = total;

        //PM71666 - DBCS and application calls out.close(), the length set here is not correct (depending on # of bytes for each character)
        //          It will be more length by the time the data is encoded by the JDK sun.nio.cs.StreamEncoder, so more bytes are
        //          sent to client than specified in content-length.  Those extra will be dropped by the client without any exception.
        if (WCCustomProperties.SET_CONTENT_LENGTH_ON_CLOSE){
            if (!committed)
            {
                // first write on the close/finish path should set an explicit
                // content-length if we can
                if (!_hasFlushed && obs != null)
                {
                    if (!this.response.isCommitted())
                    {
                        setContentLengthHeader(length);
                    }
                    _hasFlushed = true;
                    obs.alertFirstFlush();
                }
                committed = true;
            }
        } //PM71666
        flush();
    }
1207465
public void finish() throws IOException {
    if (finished) {
      return;
    }
    finished = true;
    sum.writeValue(barray, 0, false);
    out.write (barray, 0, sum.getChecksumSize());
    out.flush();
  }
374151
function endOfChunks() {
  this.callback = fsStat.bind(this.polpetta);
  if (this.boundary) {
    this.i = 0;
    this.received = {};
    this.posted = [];
    this.join("").split(this.boundary).forEach(
      endOfChunks.forEach, this
    );
    this.i || endOfChunks.done(this, this.posted.join("&"));
  } else {
    endOfChunks.done(this, this.join(""));
  }
}
842227
private static void putMarkerAndSend(AutoBuffer ab, ByteChannel channel, long data) throws IOException{
        if(data == NUM_MARKER_NEXT_BYTE_FOLLOWS){
            // we need to send another byte because zero is represented as 00 ( 2 bytes )
            ab.put1(MARKER_ORIGINAL_VALUE);
        }
        writeToChannel(ab, channel);
    }
1272723
public void markCompleted() throws IOException {
    if (disableHistory) {
      return;
    }
    fileManager.moveToDone(jobId, true, CoronaJobTracker.getMainJobID(jobId));
  }
898945
protected void afterEndDocument() {
        depth = 0;
        final Set<StackState> state = scopeState.getFirst();
        if (state.contains(StackState.WROTE_MARKUP)
                && !state.contains(StackState.WROTE_DATA)) { // but not data
            try {
                final String indent = getLineSeparator() + StringUtils.repeat("  ", 0);
                final Characters indentEvent = xmlEventFactory.createCharacters(indent);
                wrappedWriter.add(indentEvent);
            } catch (Exception ignored) {
            }
        }
        scopeState.clear();
        scopeState.push(EnumSet.noneOf(StackState.class)); // start fresh
    }
464245
private void readChunk()
	throws IOException {

	String line = readLine(_in).trim();
	int length  = Integer.parseInt(line, 16);

	if (length > 0) {

	    // make sure the chunk will fit into the buffer

	    if (length > _buf.length) {
		_buf = new byte[length];
	    }

	    int bytesLeft = length;
	    int reqBytes = 0;
	    int off = 0;
	    int read = 0;

	    /*  multiple reads might be necessary to load
		the entire chunk */
	    while (bytesLeft != 0) {
		reqBytes = bytesLeft;
		read = _in.read(_buf, off, reqBytes);
		if (read == -1) break;
		bytesLeft -= read;
		off += read;
	    }

	    _max = off;
	    _index = 0;

	} else {
	    // end of data indicated
	    _eof = true;
	}

	_in.read(); // skip CR
	_in.read(); // skip LF

    }
426309
public void write(int b) throws IOException {
    if (chunk.length - 1 == pos) {
      flush();
    }
    chunk[(int) pos++] = (byte) b;
  }
553347
def end_document implicit_end = !streaming?
      @last.implicit_end = implicit_end
      n = pop
      set_end_location(n)
      n
    end
886825
public void endWrite() {
		SynchronizationPoint<NoException> sp;
		synchronized (this) {
			if (readerWaiting != null) {
				// some readers are waiting, we unblock them
				sp = readerWaiting;
				readerWaiting = null;
				writer = false;
			} else if (writersWaiting != null) {
				sp = writersWaiting.removeFirst();
				if (writersWaiting.isEmpty()) writersWaiting = null;
				// writer stay true
			} else {
				// nobody is waiting
				writer = false;
				return;
			}
		}
		sp.unblock();
	}