获得对明文进行补位填充的字节.

@param count 需要进行填充补位操作的明文字节个数
@return 补齐用的字节数组
346815
static byte[] encode(int count) {
        // 计算需要填充的位数
        int amountToPad = BLOCK_SIZE - (count % BLOCK_SIZE);
        if (amountToPad == 0) {
            amountToPad = BLOCK_SIZE;
        }
        // 获得补位所用的字符
        char padChr = chr(amountToPad);
        StringBuilder tmp = new StringBuilder();
        for (int index = 0; index < amountToPad; index++) {
            tmp.append(padChr);
        }
        return tmp.toString().getBytes(CHARSET);
    }
933066
public long skip (long count) throws KryoException {
		long remaining = count;
		while (remaining > 0) {
			int skip = (int)Math.min(Util.maxArraySize, remaining);
			skip(skip);
			remaining -= skip;
		}
		return count;
	}
1066012
public int count(String column, Object value) {
        return count(Operators.match(column, value));
    }
304125
public static String pad(final StringBuffer buff, final String string,
            final int count)
   {
      for (int i = 0; i < count; i++)
      {
         buff.append(string);
      }

      return buff.toString();
   }
203227
public static String fill (char c, int count)
    {
        char[] sameChars = new char[count];
        Arrays.fill(sameChars, c);
        return new String(sameChars);
    }
234591
public static int count(final byte[] data) {
		int count = 0;
		for (int i = data.length; --i >= 0;) {
			count += count(data[i]);
		}
		return count;
	}
628152
public void skipValue(int count)
            throws IOException
    {
        while (count > 0) {
            byte b = readByte();
            MessageFormat f = MessageFormat.valueOf(b);
            switch (f) {
                case POSFIXINT:
                case NEGFIXINT:
                case BOOLEAN:
                case NIL:
                    break;
                case FIXMAP: {
                    int mapLen = b & 0x0f;
                    count += mapLen * 2;
                    break;
                }
                case FIXARRAY: {
                    int arrayLen = b & 0x0f;
                    count += arrayLen;
                    break;
                }
                case FIXSTR: {
                    int strLen = b & 0x1f;
                    skipPayload(strLen);
                    break;
                }
                case INT8:
                case UINT8:
                    skipPayload(1);
                    break;
                case INT16:
                case UINT16:
                    skipPayload(2);
                    break;
                case INT32:
                case UINT32:
                case FLOAT32:
                    skipPayload(4);
                    break;
                case INT64:
                case UINT64:
                case FLOAT64:
                    skipPayload(8);
                    break;
                case BIN8:
                case STR8:
                    skipPayload(readNextLength8());
                    break;
                case BIN16:
                case STR16:
                    skipPayload(readNextLength16());
                    break;
                case BIN32:
                case STR32:
                    skipPayload(readNextLength32());
                    break;
                case FIXEXT1:
                    skipPayload(2);
                    break;
                case FIXEXT2:
                    skipPayload(3);
                    break;
                case FIXEXT4:
                    skipPayload(5);
                    break;
                case FIXEXT8:
                    skipPayload(9);
                    break;
                case FIXEXT16:
                    skipPayload(17);
                    break;
                case EXT8:
                    skipPayload(readNextLength8() + 1);
                    break;
                case EXT16:
                    skipPayload(readNextLength16() + 1);
                    break;
                case EXT32:
                    skipPayload(readNextLength32() + 1);
                    break;
                case ARRAY16:
                    count += readNextLength16();
                    break;
                case ARRAY32:
                    count += readNextLength32();
                    break;
                case MAP16:
                    count += readNextLength16() * 2;
                    break;
                case MAP32:
                    count += readNextLength32() * 2; // TODO check int overflow
                    break;
                case NEVER_USED:
                    throw new MessageNeverUsedFormatException("Encountered 0xC1 \"NEVER_USED\" byte");
            }

            count--;
        }
    }
1108263
public static DoubleStream buildRandomNumberStream(int count) {
        return IntStream.range(0, count).mapToDouble(i -> Math.random());
    }
1276036
public Binder dropLast(int count) {
        assert count <= type().parameterCount();

        return drop(type().parameterCount() - count, count);
    }
662095
public static byte[] nextBytes(final int count) {
        Validate.isTrue(count >= 0, "Count cannot be negative.");

        final byte[] result = new byte[count];
        RANDOM.nextBytes(result);
        return result;
    }
173540
public String words(int count) {
		StringBuilder s = new StringBuilder();
		while (count-- > 0)
			s.append(randomWord()).append(" ");
		return s.toString().trim();
	}
470089
public int countObjects(@Nonnull String query) {
        try (Stream<Path> stream = Files.list(file.toPath())) {
            return Math.toIntExact(stream.map(Path::toFile)
                                         .filter(currentFile -> isMatchingObject(query, currentFile))
                                         .count());
        } catch (IOException e) {
            throw Exceptions.handle(e);
        }
    }
614170
public static String truncate(String str, int count)
    {
        if(count < 0 || str.length() <= count)
            return str;

        int pos = count;
        for(int i = count; i >= 0 && !Character.isWhitespace(str.charAt(i)); i--, pos--);
        return str.substring(0, pos)+"...";
    }
649057
public long count() {
		long count = 0;
		if (has()) {
			try {
				count = contentsIdDao.countOf();
			} catch (SQLException e) {
				throw new GeoPackageException(
						"Failed to count contents ids. GeoPackage: "
								+ geoPackage.getName(), e);
			}
		}
		return count;
	}
1144824
public static int count(Pattern pattern, CharSequence content) {
		if (null == pattern || null == content) {
			return 0;
		}

		int count = 0;
		final Matcher matcher = pattern.matcher(content);
		while (matcher.find()) {
			count++;
		}

		return count;
	}
300143
public static Matcher<PrintableResult> failureCountIs(final int count) {
        return new TypeSafeMatcher<PrintableResult>() {
            public void describeTo(Description description) {
                description.appendText("has " + count + " failures");
            }

            @Override
            public boolean matchesSafely(PrintableResult item) {
                return item.failureCount() == count;
            }
        };
    }
673143
public static InsnList pop(int count) {
        Validate.isTrue(count >= 0);
        InsnList ret = new InsnList();
        for (int i = 0; i < count; i++) {
            ret.add(new InsnNode(Opcodes.POP));
        }

        return ret;
    }