/** Read a string from a stream. * @param inputStream is the stream to read from. * @return the string that was read. */ static String readString(final InputStream inputStream) throws IOException { return new String(readByteArray(inputStream), StandardCharsets.UTF_8); }
/** Read a bitset from a stream. * @param inputStream is the input stream. * @return the bitset read from the stream. */ static BitSet readBitSet(final InputStream inputStream) throws IOException { return BitSet.valueOf(readByteArray(inputStream)); }