public List<BencodeType> decode(InputStream inputStream) throws IOException, BencodeParseException {
        BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
        List<BencodeType> parsedValues = new ArrayList<BencodeType>();
        int currentByte;
        while ((currentByte = readWithoutExtractionOfByte(bufferedInputStream)) > -1) {
            BencodeParser parser = ParserFactory.getResponsibleParserByFirstChar((char) currentByte);
            BencodeType value = parser.parse(bufferedInputStream);
            parsedValues.add(value);
        }
        return parsedValues;
    }