code: public static ArrayList<Tag> parseMasterElement(InputStream inputStream, final int size) throws IOException, ConverterException {
          byte bufferForSubElements[] = new byte[size];
          int readOfBytes = inputStream.read(bufferForSubElements, 0, size);
          assert readOfBytes == size;
  
          ArrayList<Tag> subElements = new ArrayList<Tag>();
          ByteArrayInputStream inputStreamForSubElements = new ByteArrayInputStream(bufferForSubElements);
          while (0 != inputStreamForSubElements.available()) {
              subElements.add(parseTag(inputStreamForSubElements));
          }
  
          return subElements;
      }
docs: method used to parse subelements of {@link CompoundTag}
  
  @param inputStream
  - stream to get value
  @param size
  - size of the value in bytes
  @return - parsed tag
  @throws IOException
  - in case of IO error
  @throws ConverterException
  - in case of any conversion exception