@Override
    public short get(int inputId) throws StorageException {
      ByteBuffer dataBuf = ByteBuffer.allocate(ELEMENT_BYTES);
      try {
        int bytesLeft = ELEMENT_BYTES;
        while (bytesLeft > 0) {
          int result = myFileChannel.read(dataBuf, offsetInFile(inputId) + dataBuf.position());
          if (result == -1 && bytesLeft == ELEMENT_BYTES) {
            return 0; // read after EOF
          }
          if (result == -1) {
            throw new StorageException("forward file type index is corrupted");
          }
          bytesLeft -= result;
        }
        dataBuf.flip();
        return dataBuf.getShort();
      }
      catch (IOException e) {
        throw closeWithException(new StorageException(e));
      }
    }
@Override
    public short get(int inputId)