public int listxattr(ByteBuffer path, final ByteBuffer list) {
        if (xattrSupport == null) {
            return handleErrno(Errno.ENOTSUPP);
        }

        String pathStr = cs.decode(path).toString();

        if (log != null && log.isDebugEnabled()) {
            log.debug("listxattr: path=" + pathStr);
        }

        int errno;
        XattrValueLister lister = new XattrValueLister(list);

        try {
            errno = xattrSupport.listxattr(pathStr, lister);
        }
        catch(Exception e) {
            return handleException(e);
        }

        // was there a BufferOverflowException?
        if (lister.boe != null) {
            return handleException(lister.boe);
        }

        return handleErrno(errno, lister);
    }