public byte[] getData(@NotNull HashMapZipFile file) throws IOException {
    if (uncompressedSize < 0) {
      throw new IOException("no data");
    }

    if (file.fileSize < (dataOffset + compressedSize)) {
      throw new EOFException();
    }

    switch (method) {
      case STORED:
        ByteBuffer inputBuffer = computeDataOffsetIfNeededAndReadInputBuffer(file.mappedBuffer);
        byte[] result = new byte[uncompressedSize];
        inputBuffer.get(result);
        return result;
      case DEFLATED:
        ByteBuffer inputBuf = computeDataOffsetIfNeededAndReadInputBuffer(file.mappedBuffer);
        Inflater inflater = new Inflater(true);
        inflater.setInput(inputBuf);
        int count = uncompressedSize;
        byte[] bytes = new byte[count];
        int offset = 0;
        try {
          while (count > 0) {
            int n = inflater.inflate(bytes, offset, count);
            if (n == 0) {
              throw new IllegalStateException("Inflater wants input, but input was already set");
            }

            offset += n;
            count -= n;
          }
          return bytes;
        }
        catch (DataFormatException e) {
          String s = e.getMessage();
          throw new ZipException(s == null ? "Invalid ZLIB data format" : s);
        }
        finally {
          inflater.end();
        }
      default:
        throw new ZipException("Found unsupported compression method " + method);
    }
  }
public byte[] getData(@NotNull HashMapZipFile file)