Skips data until the end of the channel.
19146
private void skipToEnd()
        throws IOException
    {
        InputStream is = getInputStream();

        if (is == null)
            return;

        if (chunkLength > 0)
            is.skip(chunkLength);

        for (int tag = is.read(); tag >= 0; tag = is.read()) {
            switch (tag) {
                case 'Y':
                    server.freeReadLock();
                    this.is = is = server.readChannel(channel);
                    if (is == null) {
                        this.server = null;
                        return;
                    }
                    break;

                case 'Q':
                    server.freeReadLock();
                    this.is = null;
                    this.server = null;
                    return;

                case -1:
                    server.freeReadLock();
                    this.is = null;
                    this.server = null;
                    return;

                default:
                    int length = (is.read() << 8) + is.read();
                    is.skip(length);
                    break;
            }
        }
    }
1326107
private void removeOldChannels()
    {
        Iterator<AsteriskChannelImpl> i;

        synchronized (channels)
        {
            i = channels.values().iterator();
            while (i.hasNext())
            {
                final AsteriskChannel channel = i.next();
                final Date dateOfRemoval = channel.getDateOfRemoval();
                if (channel.getState() == ChannelState.HUNGUP && dateOfRemoval != null)
                {
                    final long diff = DateUtil.getDate().getTime() - dateOfRemoval.getTime();
                    if (diff >= REMOVAL_THRESHOLD)
                    {
                        i.remove();
                    }
                }
            }
        }
    }
406120
public static void skip(DataInput in) throws IOException {
        int length = WritableUtils.readVInt(in);
        WritableUtils.skipFully(in, length);
    }
869572
private int skipBytes(ByteBuf in, int toSkip) {
		if (toSkip <= in.readableBytes()) {
			in.readBytes(toSkip);
			return 0;
		}

		int remainingToSkip = toSkip - in.readableBytes();
		in.readerIndex(in.readerIndex() + in.readableBytes());

		return remainingToSkip;
	}
1351661
def stop(self):
        
        self._stop.set()
        if self._channel is not None:
            self._channel.close()
673161
private int skipPast(byte[] data, int pos, byte target) {
        int index = pos;
        while (index < data.length) {
            if (target == data[index++]) {
                return index;
            }
        }
        return index;
    }
141373
def stop_handling_end_signal(self):
        
        try:
            signal.signal(signal.SIGTERM, signal.SIG_DFL)
            signal.signal(signal.SIGINT, signal.SIG_DFL)
        except ValueError:
            self.log('Signals cannot be caught in a Thread', level='warning')
1081871
async def _data_channel_flush(self):
        
        if self._association_state != self.State.ESTABLISHED:
            return

        while self._data_channel_queue and not self._outbound_queue:
            channel, protocol, user_data = self._data_channel_queue.popleft()

            # register channel if necessary
            stream_id = channel.id
            if stream_id is None:
                while self._data_channel_id in self._data_channels:
                    self._data_channel_id += 2
                stream_id = self._data_channel_id
                self._data_channels[stream_id] = channel
                self._data_channel_id += 2
                channel._setId(stream_id)

            # send data
            if protocol == WEBRTC_DCEP:
                await self._send(stream_id, protocol, user_data)
            else:
                if channel.maxPacketLifeTime:
                    expiry = time.time() + (channel.maxPacketLifeTime / 1000)
                else:
                    expiry = None
                await self._send(stream_id, protocol, user_data,
                                 expiry=expiry,
                                 max_retransmits=channel.maxRetransmits,
                                 ordered=channel.ordered)
                channel._addBufferedAmount(-len(user_data))
149705
def _end_channel(self, channel):
        
        self.stop_on_empty_queue[channel] = True

        # by joining the we wait until its loop finishes.
        # it won't loop forever since we've set self.stop_on_empty_queue=True
        write_thread = self.thread_write_instances[channel]

        thread_join_non_blocking(write_thread)
1251581
def cancel(self):
        """"""
        if self.channel_open:
            try:
                self.backend.cancel(self.consumer_tag)
            except KeyError:
                pass
616212
public void endOfData() {
		ArrayList<Runnable> list = null;
		synchronized (this) {
			end = true;
			if (waitingData.isEmpty()) {
				list = listeners;
				listeners = null;
			}
		}
		if (list != null) {
			for (Runnable listener : list) listener.run();
		}
		// notify after listeners
		synchronized (this) {
			this.notifyAll();
		}
	}
923286
public synchronized long skip(long n) throws IOException {
        getBufIfOpen(); // Check for closed stream
        if (n <= 0) {
            return 0;
        }
        long avail = count - pos;

        if (avail <= 0) {
            // If no mark position set then don't keep in buffer
            if (markpos <0)
                return getInIfOpen().skip(n);

            // Fill in buffer to save bytes for reset
            fill();
            avail = count - pos;
            if (avail <= 0)
                return 0;
        }

        long skipped = (avail < n) ? avail : n;
        pos += skipped;
        return skipped;
    }
184240
public static void skip(DataInput in) throws IOException {
    int length = in.readUnsignedShort();
    WritableUtils.skipFully(in, length);
  }
675447
@Override
    public long skip(long n) throws IOException {
        final long skipped = super.skip(n);
        if (includeSkipped && skipped > 0) {
            dataLength += skipped;
            checkLength(false);
        }
        return skipped;
    }
426470
private static void skipStream(InputStream in, long count) throws IOException {
        long size = count;
        long skipped = 0;
        while (size > 0 && skipped >= 0) {
            skipped = in.skip(size);
            if (skipped != -1) {
                size -= skipped;
            }
        }
    }
1366850
def _skip_frame(self):
        """"""
        size = self.read_size()
        for i in range(size+1):
            line = self._f.readline()
            if len(line) == 0:
                raise StopIteration
1273943
function skip (delimeter) {
    var last, char;

    last = this.last;

    if (this.ptr > last) { // end of buffer
        return;
    }

    while (true) {
        char = this.buf[this.ptr];
        if (char.search(delimeter) === -1) { // end of gap
            return true;
        }
        if (this.ptr === last) { // end of buffer
            this.ptr++;
            return;
        }
        this.ptr++;
    }
}