private static int readTest(String fname, boolean isLink) {
        byte[] buf = new byte[blockSize];
        int n = isLink
                ? Library.readlink(fname, buf)
                : Library.read(fname, buf);
        boolean needNewline = false;
        if (n < 0) {
            return n;
        }
        for (int i = 0; i < buf.length; i++) {
            if (buf[i] != 0) {
                showChar(buf[i] & 0xff);
                needNewline = (buf[i] != '\n');
            }
        }
        if (needNewline) {
            out.printf("\n");
        }
        return n;
    } // readTest(String,boolean)