/** * Returns a string representation of this field. * * @return a string representation of this field. */ @Override public final java.lang.String toString() { return java.lang.Long.toString(get()); } }
public static int getsockopt (int s, SocketLevel level, int optname) { IntByReference ref; if (optname == SocketOption.SO_RCVTIMEO.intValue() || optname == SocketOption.SO_SNDTIMEO.intValue()) { DefaultNativeTimeval t = new DefaultNativeTimeval(Runtime.getSystemRuntime()); ref = new IntByReference(DefaultNativeTimeval.size(t)); Native.libsocket().getsockopt(s, level.intValue(), optname, t, ref); return (t.tv_sec.intValue() * 1000 + t.tv_usec.intValue() / 1000); } else { ByteBuffer buf = ByteBuffer.allocate(4); buf.order(ByteOrder.nativeOrder()); ref = new IntByReference(4); Native.libsocket().getsockopt(s, level.intValue(), optname, buf, ref); return buf.getInt(); } }
st_rdev = new dev_t(); pad2 = IS_32_BIT ? new Unsigned16() : null; st_size = new SignedLong(); st_blksize = new blksize_t(); st_blocks = new blkcnt_t();
st_rdev = new dev_t(); pad2 = IS_32_BIT ? new Unsigned16() : null; st_size = new SignedLong(); st_blksize = new blksize_t(); st_blocks = new blkcnt_t();
public long sec() { return tv_sec.get(); }
public void sec(long sec) { this.tv_sec.set(sec); }
public void nsec(long usec) { this.tv_nsec.set(usec); }
/** * Creates an array of <tt>SignedLong</tt> instances. * * @param array the array to store the instances in * @return the array that was passed in */ protected final SignedLong[] array(SignedLong[] array) { arrayBegin(); for (int i = 0; i < array.length; ++i) { array[i] = new SignedLong(); } arrayEnd(); return array; }
public long sec() { return tv_sec.get(); }
public void sec(long sec) { this.tv_sec.set(sec); }
public void usec(long usec) { this.tv_usec.set(usec); }
public long usec() { return tv_usec.get(); } }
/** * Creates an array of <tt>SignedLong</tt> instances. * * @param array the array to store the instances in * @return the array that was passed in */ protected final SignedLong[] array(SignedLong[] array) { arrayBegin(); for (int i = 0; i < array.length; ++i) { array[i] = new SignedLong(); } arrayEnd(); return array; }
/** * Creates an array of <tt>SignedLong</tt> instances. * * @param array the array to store the instances in * @return the array that was passed in */ protected final SignedLong[] array(SignedLong[] array) { arrayBegin(); for (int i = 0; i < array.length; ++i) { array[i] = new SignedLong(); } arrayEnd(); return array; }
public void usec(long usec) { this.tv_usec.set(usec); }
/** * Returns a java long representation of this field. * * @return a java long value for this field. */ @Override public final long longValue() { return get(); }
/** * Returns a java int representation of this field. * * @return a java int value for this field. */ @Override public final int intValue() { return (int) get(); }