public static int enc_doublebe( double d, byte[] dst, int di ) { return enc_uint64be( Double.doubleToLongBits( d ), dst, di ); } public static double dec_doublele( byte[] src, int si )
public static int enc_doublebe( double d, byte[] dst, int di ) { return enc_uint64be( Double.doubleToLongBits( d ), dst, di ); } public static double dec_doublele( byte[] src, int si )
public static int enc_doublebe( double d, byte[] dst, int di ) { return enc_uint64be( Double.doubleToLongBits( d ), dst, di ); } public static double dec_doublele( byte[] src, int si )
public static int enc_doublebe( double d, byte[] dst, int di ) { return enc_uint64be( Double.doubleToLongBits( d ), dst, di ); } public static double dec_doublele( byte[] src, int si )
public static int enc_doublebe ( double d, byte[] dst, int di ) { return enc_uint64be(Double.doubleToLongBits(d), dst, di); }
public static int enc_doublebe ( double d, byte[] dst, int di ) { return enc_uint64be(Double.doubleToLongBits(d), dst, di); }
public final void writeLong( long v ) throws SmbException { Encdec.enc_uint64be( v, tmp, 0 ); write( tmp, 0, 8 ); } public final void writeFloat( float v ) throws SmbException {
@Override public final void writeLong ( long v ) throws SmbException { Encdec.enc_uint64be(v, this.tmp, 0); write(this.tmp, 0, 8); }
public final void writeLong( long v ) throws SmbException { Encdec.enc_uint64be( v, tmp, 0 ); write( tmp, 0, 8 ); } public final void writeFloat( float v ) throws SmbException {
public final void writeLong( long v ) throws SmbException { Encdec.enc_uint64be( v, tmp, 0 ); write( tmp, 0, 8 ); } public final void writeFloat( float v ) throws SmbException {
public final void writeLong( long v ) throws SmbException { Encdec.enc_uint64be( v, tmp, 0 ); write( tmp, 0, 8 ); } public final void writeFloat( float v ) throws SmbException {
@Override public final void writeLong ( long v ) throws SmbException { Encdec.enc_uint64be(v, this.tmp, 0); write(this.tmp, 0, 8); }
public static int enc_time ( Date date, byte[] dst, int di, int enc ) { long t; switch ( enc ) { case TIME_1970_SEC_32BE: return enc_uint32be((int) ( date.getTime() / 1000L ), dst, di); case TIME_1970_SEC_32LE: return enc_uint32le((int) ( date.getTime() / 1000L ), dst, di); case TIME_1904_SEC_32BE: return enc_uint32be((int) ( ( date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970 ) & 0xFFFFFFFF ), dst, di); case TIME_1904_SEC_32LE: return enc_uint32le((int) ( ( date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970 ) & 0xFFFFFFFF ), dst, di); case TIME_1601_NANOS_64BE: t = ( date.getTime() + SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601 ) * 10000L; return enc_uint64be(t, dst, di); case TIME_1601_NANOS_64LE: t = ( date.getTime() + SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601 ) * 10000L; return enc_uint64le(t, dst, di); case TIME_1970_MILLIS_64BE: return enc_uint64be(date.getTime(), dst, di); case TIME_1970_MILLIS_64LE: return enc_uint64le(date.getTime(), dst, di); default: throw new IllegalArgumentException("Unsupported time encoding"); } }
public static int enc_time( Date date, byte[] dst, int di, int enc ) { long t; switch( enc ) { case TIME_1970_SEC_32BE: return enc_uint32be( (int)(date.getTime() / 1000L), dst, di ); case TIME_1970_SEC_32LE: return enc_uint32le( (int)(date.getTime() / 1000L), dst, di ); case TIME_1904_SEC_32BE: return enc_uint32be( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1904_SEC_32LE: return enc_uint32le( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1601_NANOS_64BE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64be( t, dst, di ); case TIME_1601_NANOS_64LE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64le( t, dst, di ); case TIME_1970_MILLIS_64BE: return enc_uint64be( date.getTime(), dst, di ); case TIME_1970_MILLIS_64LE: return enc_uint64le( date.getTime(), dst, di ); default: throw new IllegalArgumentException( "Unsupported time encoding" ); } }
public static int enc_time( Date date, byte[] dst, int di, int enc ) { long t; switch( enc ) { case TIME_1970_SEC_32BE: return enc_uint32be( (int)(date.getTime() / 1000L), dst, di ); case TIME_1970_SEC_32LE: return enc_uint32le( (int)(date.getTime() / 1000L), dst, di ); case TIME_1904_SEC_32BE: return enc_uint32be( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1904_SEC_32LE: return enc_uint32le( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1601_NANOS_64BE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64be( t, dst, di ); case TIME_1601_NANOS_64LE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64le( t, dst, di ); case TIME_1970_MILLIS_64BE: return enc_uint64be( date.getTime(), dst, di ); case TIME_1970_MILLIS_64LE: return enc_uint64le( date.getTime(), dst, di ); default: throw new IllegalArgumentException( "Unsupported time encoding" ); } }
public static int enc_time ( Date date, byte[] dst, int di, int enc ) { long t; switch ( enc ) { case TIME_1970_SEC_32BE: return enc_uint32be((int) ( date.getTime() / 1000L ), dst, di); case TIME_1970_SEC_32LE: return enc_uint32le((int) ( date.getTime() / 1000L ), dst, di); case TIME_1904_SEC_32BE: return enc_uint32be((int) ( ( date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970 ) & 0xFFFFFFFF ), dst, di); case TIME_1904_SEC_32LE: return enc_uint32le((int) ( ( date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970 ) & 0xFFFFFFFF ), dst, di); case TIME_1601_NANOS_64BE: t = ( date.getTime() + SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601 ) * 10000L; return enc_uint64be(t, dst, di); case TIME_1601_NANOS_64LE: t = ( date.getTime() + SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601 ) * 10000L; return enc_uint64le(t, dst, di); case TIME_1970_MILLIS_64BE: return enc_uint64be(date.getTime(), dst, di); case TIME_1970_MILLIS_64LE: return enc_uint64le(date.getTime(), dst, di); default: throw new IllegalArgumentException("Unsupported time encoding"); } }
public static int enc_time( Date date, byte[] dst, int di, int enc ) { long t; switch( enc ) { case TIME_1970_SEC_32BE: return enc_uint32be( (int)(date.getTime() / 1000L), dst, di ); case TIME_1970_SEC_32LE: return enc_uint32le( (int)(date.getTime() / 1000L), dst, di ); case TIME_1904_SEC_32BE: return enc_uint32be( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1904_SEC_32LE: return enc_uint32le( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1601_NANOS_64BE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64be( t, dst, di ); case TIME_1601_NANOS_64LE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64le( t, dst, di ); case TIME_1970_MILLIS_64BE: return enc_uint64be( date.getTime(), dst, di ); case TIME_1970_MILLIS_64LE: return enc_uint64le( date.getTime(), dst, di ); default: throw new IllegalArgumentException( "Unsupported time encoding" ); } }
public static int enc_time( Date date, byte[] dst, int di, int enc ) { long t; switch( enc ) { case TIME_1970_SEC_32BE: return enc_uint32be( (int)(date.getTime() / 1000L), dst, di ); case TIME_1970_SEC_32LE: return enc_uint32le( (int)(date.getTime() / 1000L), dst, di ); case TIME_1904_SEC_32BE: return enc_uint32be( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1904_SEC_32LE: return enc_uint32le( (int)((date.getTime() / 1000L + SEC_BETWEEEN_1904_AND_1970) & 0xFFFFFFFF), dst, di ); case TIME_1601_NANOS_64BE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64be( t, dst, di ); case TIME_1601_NANOS_64LE: t = (date.getTime() + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L; return enc_uint64le( t, dst, di ); case TIME_1970_MILLIS_64BE: return enc_uint64be( date.getTime(), dst, di ); case TIME_1970_MILLIS_64LE: return enc_uint64le( date.getTime(), dst, di ); default: throw new IllegalArgumentException( "Unsupported time encoding" ); } }