public static long dec_uint64be ( byte[] src, int si ) { long l; l = dec_uint32be(src, si) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32be(src, si + 4) & 0xFFFFFFFFL; return l; }
public static long dec_uint64be( byte[] src, int si ) { long l; l = dec_uint32be( src, si ) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32be( src, si + 4 ) & 0xFFFFFFFFL; return l; } public static long dec_uint64le( byte[] src, int si )
public static long dec_uint64be( byte[] src, int si ) { long l; l = dec_uint32be( src, si ) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32be( src, si + 4 ) & 0xFFFFFFFFL; return l; } public static long dec_uint64le( byte[] src, int si )
public static long dec_uint64be( byte[] src, int si ) { long l; l = dec_uint32be( src, si ) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32be( src, si + 4 ) & 0xFFFFFFFFL; return l; } public static long dec_uint64le( byte[] src, int si )
public static long dec_uint64be( byte[] src, int si ) { long l; l = dec_uint32be( src, si ) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32be( src, si + 4 ) & 0xFFFFFFFFL; return l; } public static long dec_uint64le( byte[] src, int si )
public static long dec_uint64be ( byte[] src, int si ) { long l; l = dec_uint32be(src, si) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32be(src, si + 4) & 0xFFFFFFFFL; return l; }
public static float dec_floatbe( byte[] src, int si ) { return Float.intBitsToFloat( dec_uint32be( src, si )); }
public static float dec_floatbe( byte[] src, int si ) { return Float.intBitsToFloat( dec_uint32be( src, si )); }
public static float dec_floatbe( byte[] src, int si ) { return Float.intBitsToFloat( dec_uint32be( src, si )); }
public static float dec_floatbe ( byte[] src, int si ) { return Float.intBitsToFloat(dec_uint32be(src, si)); }
public static float dec_floatbe( byte[] src, int si ) { return Float.intBitsToFloat( dec_uint32be( src, si )); }
public static float dec_floatbe ( byte[] src, int si ) { return Float.intBitsToFloat(dec_uint32be(src, si)); }
@Override public final int readInt () throws SmbException { if ( ( read(this.tmp, 0, 4) ) < 0 ) { throw new SmbEndOfFileException(); } return Encdec.dec_uint32be(this.tmp, 0); }
public final int readInt() throws SmbException { if((read( tmp, 0, 4 )) < 0 ) { throw new SmbException( "EOF" ); } return Encdec.dec_uint32be( tmp, 0 ); } public final long readLong() throws SmbException {
public final int readInt() throws SmbException { if((read( tmp, 0, 4 )) < 0 ) { throw new SmbException( "EOF" ); } return Encdec.dec_uint32be( tmp, 0 ); } public final long readLong() throws SmbException {
public final int readInt() throws SmbException { if((read( tmp, 0, 4 )) < 0 ) { throw new SmbException( "EOF" ); } return Encdec.dec_uint32be( tmp, 0 ); } public final long readLong() throws SmbException {
public final int readInt() throws SmbException { if((read( tmp, 0, 4 )) < 0 ) { throw new SmbException( "EOF" ); } return Encdec.dec_uint32be( tmp, 0 ); } public final long readLong() throws SmbException {
@Override public final int readInt () throws SmbException { if ( ( read(this.tmp, 0, 4) ) < 0 ) { throw new SmbEndOfFileException(); } return Encdec.dec_uint32be(this.tmp, 0); }
public static Date dec_time ( byte[] src, int si, int enc ) { long t; switch ( enc ) { case TIME_1970_SEC_32BE: return new Date(dec_uint32be(src, si) * 1000L); case TIME_1970_SEC_32LE: return new Date(dec_uint32le(src, si) * 1000L); case TIME_1904_SEC_32BE: return new Date( ( ( dec_uint32be(src, si) & 0xFFFFFFFFL ) - SEC_BETWEEEN_1904_AND_1970 ) * 1000L); case TIME_1904_SEC_32LE: return new Date( ( ( dec_uint32le(src, si) & 0xFFFFFFFFL ) - SEC_BETWEEEN_1904_AND_1970 ) * 1000L); case TIME_1601_NANOS_64BE: t = dec_uint64be(src, si); return new Date(t / 10000L - SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601); case TIME_1601_NANOS_64LE: t = dec_uint64le(src, si); return new Date(t / 10000L - SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601); case TIME_1970_MILLIS_64BE: return new Date(dec_uint64be(src, si)); case TIME_1970_MILLIS_64LE: return new Date(dec_uint64le(src, si)); default: throw new IllegalArgumentException("Unsupported time encoding"); } }
public static Date dec_time ( byte[] src, int si, int enc ) { long t; switch ( enc ) { case TIME_1970_SEC_32BE: return new Date(dec_uint32be(src, si) * 1000L); case TIME_1970_SEC_32LE: return new Date(dec_uint32le(src, si) * 1000L); case TIME_1904_SEC_32BE: return new Date( ( ( dec_uint32be(src, si) & 0xFFFFFFFFL ) - SEC_BETWEEEN_1904_AND_1970 ) * 1000L); case TIME_1904_SEC_32LE: return new Date( ( ( dec_uint32le(src, si) & 0xFFFFFFFFL ) - SEC_BETWEEEN_1904_AND_1970 ) * 1000L); case TIME_1601_NANOS_64BE: t = dec_uint64be(src, si); return new Date(t / 10000L - SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601); case TIME_1601_NANOS_64LE: t = dec_uint64le(src, si); return new Date(t / 10000L - SmbConstants.MILLISECONDS_BETWEEN_1970_AND_1601); case TIME_1970_MILLIS_64BE: return new Date(dec_uint64be(src, si)); case TIME_1970_MILLIS_64LE: return new Date(dec_uint64le(src, si)); default: throw new IllegalArgumentException("Unsupported time encoding"); } }