final int flags = fi.flags.get(); LOG.trace("open({}, 0x{}) [Alluxio: {}]", path, Integer.toHexString(flags), uri);
st_dev = new dev_t(); st_ino = new u_int64_t(); st_mode = new Signed32(); st_nlink = new Signed16(); st_uid = new uid_t();
transform.options.set(TJXOPT.TJXOPT_CROP | TJXOPT.TJXOPT_TRIM); transform.r.x.set(region.x); transform.r.y.set(region.y); transform.r.w.set(0); } else { transform.r.w.set(region.width); transform.r.h.set(0); } else { transform.r.h.set(region.height); throw new IllegalArgumentException("Invalid rotation, must be 90, 180 or 270"); transform.op.set(op.intValue());
st_dev = new dev_t(); st_ino = new u_int64_t(); st_mode = new Signed32(); st_nlink = new Signed16(); st_uid = new uid_t();
f_favail = new fsfilcnt64_t(); f_fsid = new UnsignedLong(); f_unused = Platform.IS_32_BIT ? new Signed32() : null; f_flag = new UnsignedLong(); f_namemax = new UnsignedLong();
f_favail = new fsfilcnt64_t(); f_fsid = new UnsignedLong(); f_unused = Platform.IS_32_BIT ? new Signed32() : null; f_flag = new UnsignedLong(); f_namemax = new UnsignedLong();
protected FuseFileInfo(jnr.ffi.Runtime runtime) { super(runtime); if(!Platform.IS_WINDOWS) { flags = new Signed32(); fh_old = new UnsignedLong(); direct_io = new Padding(NativeType.UCHAR, 1); keep_cache = new Padding(NativeType.UCHAR, 1); flush = new Padding(NativeType.UCHAR, 1); nonseekable = new Padding(NativeType.UCHAR, 1); flock_release = new Padding(NativeType.UCHAR, 1); padding = new Padding(NativeType.UCHAR, 3); fh = new u_int64_t(); lock_owner = new u_int64_t(); } else { flags = new Signed32(); fh_old = new Unsigned32(); new Signed32(); // writepage direct_io = new Padding(NativeType.UCHAR, 1); keep_cache = new Padding(NativeType.UCHAR, 1); flush = new Padding(NativeType.UCHAR, 1); nonseekable = new Padding(NativeType.UCHAR, 1); flock_release = new Padding(NativeType.UCHAR, 0); padding = new Padding(NativeType.UCHAR, 0); fh = new u_int64_t(); lock_owner = new u_int64_t(); } }
protected FuseFileInfo(jnr.ffi.Runtime runtime) { super(runtime); if(!Platform.IS_WINDOWS) { flags = new Signed32(); fh_old = new UnsignedLong(); direct_io = new Padding(NativeType.UCHAR, 1); keep_cache = new Padding(NativeType.UCHAR, 1); flush = new Padding(NativeType.UCHAR, 1); nonseekable = new Padding(NativeType.UCHAR, 1); flock_release = new Padding(NativeType.UCHAR, 1); padding = new Padding(NativeType.UCHAR, 3); fh = new u_int64_t(); lock_owner = new u_int64_t(); } else { flags = new Signed32(); fh_old = new Unsigned32(); new Signed32(); // writepage direct_io = new Padding(NativeType.UCHAR, 1); keep_cache = new Padding(NativeType.UCHAR, 1); flush = new Padding(NativeType.UCHAR, 1); nonseekable = new Padding(NativeType.UCHAR, 1); flock_release = new Padding(NativeType.UCHAR, 0); padding = new Padding(NativeType.UCHAR, 0); fh = new u_int64_t(); lock_owner = new u_int64_t(); } }
public Info(int width, int height, int subsampling, tjscalingfactor[] factors) { this.width = width; this.height = height; this.subsampling = subsampling; // The available sizes are determined from the list of scaling factors. this.availableSizes = Arrays.stream(factors) .filter(f -> f.denom.get() > 0) .sorted(Comparator.comparing(f -> -getScaled(width, f.num.get(), f.denom.get()))) .map(f -> new Dimension(getScaled(width, f.num.get(), f.denom.get()), getScaled(height, f.num.get(), f.denom.get()))) .filter(d -> d.width <= width && d.height <= height && d.width > 0 && d.height > 0) .distinct() .collect(Collectors.toList()); }
/** * Creates an array of <tt>Signed32</tt> instances. * * @param array the array to store the instances in * @return the array that was passed in */ protected final Signed32[] array(Signed32[] array) { arrayBegin(); for (int i = 0; i < array.length; ++i) { array[i] = new Signed32(); } arrayEnd(); return array; }
/** * Creates an array of <tt>Signed32</tt> instances. * * @param array the array to store the instances in * @return the array that was passed in */ protected final Signed32[] array(Signed32[] array) { arrayBegin(); for (int i = 0; i < array.length; ++i) { array[i] = new Signed32(); } arrayEnd(); return array; }
/** * Similar to FUSE_BUFVEC_INIT macros */ public static void init(FuseBufvec buf, long size) { buf.count.set(1); buf.idx.set(0); buf.off.set(0); buf.buf.size.set(size); buf.buf.flags.set(0); buf.buf.mem.set(0); buf.buf.fd.set(-1); buf.buf.pos.set(0); } }
/** * Creates an array of <tt>Signed32</tt> instances. * * @param array the array to store the instances in * @return the array that was passed in */ protected final Signed32[] array(Signed32[] array) { arrayBegin(); for (int i = 0; i < array.length; ++i) { array[i] = new Signed32(); } arrayEnd(); return array; }
/** * Similar to FUSE_BUFVEC_INIT macros */ public static void init(FuseBufvec buf, long size) { buf.count.set(1); buf.idx.set(0); buf.off.set(0); buf.buf.size.set(size); buf.buf.flags.set(0); buf.buf.mem.set(0); buf.buf.fd.set(-1); buf.buf.pos.set(0); } }
/** * Returns a java int representation of this field. * * @return a java int value for this field. */ @Override public final int intValue() { return get(); } }
static Protocol protocolFromNative(UnixProtoent p) { if (p == null) { return null; } List<String> emptyAliases = Collections.emptyList(); Pointer ptr; final Collection<String> aliases = ((ptr = p.aliases.get()) != null) ? StringUtil.getNullTerminatedStringArray(ptr) : emptyAliases; return new Protocol(p.name.get(), (short) p.proto.get(), aliases); }