public int readlink(ByteBuffer path, ByteBuffer link) {
        String pathStr = cs.decode(path).toString();

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

        CharBuffer linkCb = CharBuffer.allocate(link.capacity());

        try {
            int errno = fs3.readlink(pathStr, linkCb);

            if (errno == 0) {
                linkCb.flip();

                CharsetEncoder enc = cs.newEncoder()
                        .onUnmappableCharacter(CodingErrorAction.REPLACE)
                        .onMalformedInput(CodingErrorAction.REPLACE);

                CoderResult result = enc.encode(linkCb, link, true);
                if (result.isOverflow()) {
                    throw new FuseException("Buffer owerflow while encoding result").initErrno(Errno.ENAMETOOLONG);
                }
            }

            return handleErrno(errno, linkCb.rewind());
        }
        catch(Exception e) {
            return handleException(e);
        }
    }