The pad method skips the bits that padded a stream to fit some
allocation. pad(8) will skip over the remainder of a byte.

@param width The width of the pad field in bits.
@return true if all of the padding bits were zero.
@throws JSONException
512319
public boolean pad(int width) throws JSONException {
        try {
            return this.bitreader.pad(width);
        } catch (Throwable e) {
            throw new JSONException(e);
        }
    }
1030986
private boolean skipWhiteSpace(WsByteBuffer buff) {
        // keep reading until we hit the end of the buffer or a non-space char
        byte b;
        do {
            if (this.bytePosition >= this.byteLimit) {
                if (!fillByteCache(buff)) {
                    // not filled
                    return false;
                }
            }
            b = this.byteCache[this.bytePosition++];
        } while (BNFHeaders.SPACE == b || BNFHeaders.TAB == b);

        // move byte position back one.
        this.bytePosition--;
        return true;
    }
698547
public void setWidth(String width) {

        try {
            m_width = Integer.parseInt(width);
        } catch (NumberFormatException e) {
            m_width = -1;
        }
    }
60010
public JsonNode decode(byte[] bytes) throws Exception {
        JsonNode jsonNode = mapper.fromJson(bytes);
        return jsonNode;
    }
241932
@Override
  public long skip (final long nBytes) throws IOException
  {
    ValueEnforcer.isGE0 (nBytes, "Bytes");

    _ensureOpen ();
    long nRest = nBytes;
    while (nRest > 0)
    {
      if (m_nNextCharIndex >= m_nChars)
        _fill ();
      if (m_nNextCharIndex >= m_nChars)
      {
        // EOF
        break;
      }
      if (m_bSkipLF)
      {
        m_bSkipLF = false;
        if (m_aBuf[m_nNextCharIndex] == '\n')
          m_nNextCharIndex++;
      }
      final int d = m_nChars - m_nNextCharIndex;
      if (nRest <= d)
      {
        m_nNextCharIndex += nRest;
        nRest = 0;
        break;
      }
      nRest -= d;
      m_nNextCharIndex = m_nChars;
    }
    return nBytes - nRest;
  }
1270664
public static void skip(final DataInput in) throws IOException {
		final int length = in.readInt();
		skipFully(in, length);
	}
740902
public static void noSpace(String string) throws JSONException {
    int i, length = string.length();
    if (length == 0) {
      throw new JSONException("Empty string.");
    }
    for (i = 0; i < length; i += 1) {
      if (Character.isWhitespace(string.charAt(i))) {
        throw new JSONException("'" + string + "' contains a space character.");
      }
    }
  }
101658
public int read(BitReader bitreader) throws JSONException {
        try {
            this.width = 0;
            Symbol symbol = this.table;
            while (symbol.integer == none) {
                this.width += 1;
                symbol = bitreader.bit() ? symbol.one : symbol.zero;
            }
            tick(symbol.integer);
            if (JSONzip.probe) {
                JSONzip.logchar(symbol.integer, this.width);
            }
            return symbol.integer;
        } catch (Throwable e) {
            throw new JSONException(e);
        }
    }
766290
public static void setBytesFromInt(byte[] bytes,
                                       int    offset,
                                       int    byteCount,
                                       int    value)
    {
        long maxval = ((1L << (8 * byteCount)) - 1);
        if (value > maxval)
        {
            final String msg = "value too large for byteCount";
            IllegalArgumentException iae = new IllegalArgumentException(msg);
            FFDCFilter.processException(
                iae,
                "com.ibm.ws.Transaction.JTA.Util.setBytesFromInt",
                "579");
            throw iae;
        }

        switch (byteCount)
        {
            case 4: bytes[offset++] = (byte) ((value >> 24) & 0xFF);
            case 3: bytes[offset++] = (byte) ((value >> 16) & 0xFF);
            case 2: bytes[offset++] = (byte) ((value >> 8 ) & 0xFF);
            case 1: bytes[offset++] = (byte) ((value      ) & 0xFF);
                break;
            default:
                final String msg = "byteCount is not between 1 and 4";
                IllegalArgumentException iae =
                    new IllegalArgumentException(msg);
                FFDCFilter.processException(
                    iae,
                    "com.ibm.ws.Transaction.JTA.Util.setBytesFromInt",
                    "598");
                throw iae;
        }
    }
887853
protected void skipBytes(int amount) throws IOException {
		ensureAvailableBytes(amount);
		this.buffer.position(this.buffer.position() + amount);
	}
1219167
def pad_after( length )
      before = stream_position
      pad = Padding.padding_for(length)
      pad.times do
        @stream.write_unsigned_int_8(0)
      end
      after = stream_position
      log.debug "padded 0x#{length.to_s(16)} with 0x#{pad.to_s(16)} stream #{before.to_s(16)}/#{after.to_s(16)}"
    end
461608
public static final String padHexString(int num, int width) {
        final String zeroPad = "0000000000000000";

        String str = Integer.toHexString(num);
        final int length = str.length();

        if (length >= width)
            return str;

        StringBuilder buffer = new StringBuilder(zeroPad.substring(0, width));
        buffer.replace(width - length, width, str);
        return buffer.toString();
    }
776040
@Override
	public long skip(long n) throws IOException {
		long numskip = this.in.skip(n);
		if (numskip > 0) {
			this.inputBytesRead += numskip;
		}
		return numskip;
	}
470960
public int read(int width) throws IOException {
        if (width == 0) {
            return 0;
        }
        if (width < 0 || width > 32) {
            throw new IOException("Bad read width.");
        }
        int result = 0;
        while (width > 0) {
            if (this.available == 0) {
                this.unread = this.in.read();
                if (this.unread < 0) {
                    throw new IOException("Attempt to read past end.");
                }
                this.available = 8;
            }
            int take = width;
            if (take > this.available) {
                take = this.available;
            }
            result |= ((this.unread >>> (this.available - take)) &
                    ((1 << take) - 1)) << (width - take);
            this.nrBits += take;
            this.available -= take;
            width -= take;
        }
        return result;
    }
74600
function _skipBytes (n, fn) {
  assert(!this._parserCallback, 'there is already a "callback" set!');
  assert(n > 0, 'can only skip > 0 bytes, got "' + n + '"');
  if (!this._parserInit) init(this);
  debug('skipping %o bytes', n);
  this._parserBytesLeft = n;
  this._parserCallback = fn;
  this._parserState = SKIPPING;
}
671432
public static boolean skipUntil(InputStream in, byte separator) throws IOException {
        int r;
        while((r = in.read()) >= 0) {
            if(((byte) r) == separator) { return true; }
        }
        return false;
    }
1067489
public static boolean beforeThePrefixBytes(@Nonnull byte[] bytes, @Nonnull byte[] prefixBytes) {
		final int prefixLength = prefixBytes.length;
		for (int i = 0; i < prefixLength; ++i) {
			int r = (char) prefixBytes[i] - (char) bytes[i];
			if (r != 0) {
				return r > 0;
			}
		}
		return false;
	}