本文整理汇总了Java中jcifs.util.Encdec.dec_uint64le方法的典型用法代码示例。如果您正苦于以下问题:Java Encdec.dec_uint64le方法的具体用法?Java Encdec.dec_uint64le怎么用?Java Encdec.dec_uint64le使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jcifs.util.Encdec
的用法示例。
在下文中一共展示了Encdec.dec_uint64le方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dec_ndr_hyper
import jcifs.util.Encdec; //导入方法依赖的package包/类
public long dec_ndr_hyper() {
align(8);
long val = Encdec.dec_uint64le(buf, index);
advance(8);
return val;
}
示例2: peekKey
import jcifs.util.Encdec; //导入方法依赖的package包/类
@Override
protected Long peekKey () throws IOException {
do {
if ( ( readn(this.in, this.sbuf, 0, 4) ) < 4 ) {
return null;
}
}
while ( this.sbuf[ 0 ] == (byte) 0x85 ); /* Dodge NetBIOS keep-alive */
/* read smb header */
if ( ( readn(this.in, this.sbuf, 4, SmbConstants.SMB1_HEADER_LENGTH) ) < SmbConstants.SMB1_HEADER_LENGTH ) {
return null;
}
if ( log.isTraceEnabled() ) {
log.trace("New data read: " + this);
log.trace(Hexdump.toHexString(this.sbuf, 4, 32));
}
for ( ;; ) {
/*
* 01234567
* 00SSFSMB
* 0 - 0's
* S - size of payload
* FSMB - 0xFF SMB magic #
*/
if ( this.sbuf[ 0 ] == (byte) 0x00 && this.sbuf[ 4 ] == (byte) 0xFE && this.sbuf[ 5 ] == (byte) 'S' && this.sbuf[ 6 ] == (byte) 'M'
&& this.sbuf[ 7 ] == (byte) 'B' ) {
this.smb2 = true;
// also read the rest of the header
int lenDiff = Smb2Constants.SMB2_HEADER_LENGTH - SmbConstants.SMB1_HEADER_LENGTH;
if ( readn(this.in, this.sbuf, 4 + SmbConstants.SMB1_HEADER_LENGTH, lenDiff) < lenDiff ) {
return null;
}
return (long) Encdec.dec_uint64le(this.sbuf, 28);
}
if ( this.sbuf[ 0 ] == (byte) 0x00 && this.sbuf[ 1 ] == (byte) 0x00 && ( this.sbuf[ 4 ] == (byte) 0xFF ) && this.sbuf[ 5 ] == (byte) 'S'
&& this.sbuf[ 6 ] == (byte) 'M' && this.sbuf[ 7 ] == (byte) 'B' ) {
break; /* all good (SMB) */
}
/* out of phase maybe? */
/* inch forward 1 byte and try again */
for ( int i = 0; i < 35; i++ ) {
log.warn("Possibly out of phase, trying to resync " + Hexdump.toHexString(this.sbuf, 0, 16));
this.sbuf[ i ] = this.sbuf[ i + 1 ];
}
int b;
if ( ( b = this.in.read() ) == -1 )
return null;
this.sbuf[ 35 ] = (byte) b;
}
/*
* Unless key returned is null or invalid Transport.loop() always
* calls doRecv() after and no one else but the transport thread
* should call doRecv(). Therefore it is ok to expect that the data
* in sbuf will be preserved for copying into BUF in doRecv().
*/
return (long) Encdec.dec_uint16le(this.sbuf, 34) & 0xFFFF;
}
示例3: dec_ndr_hyper
import jcifs.util.Encdec; //导入方法依赖的package包/类
public long dec_ndr_hyper () {
align(8);
long val = Encdec.dec_uint64le(this.buf, this.index);
advance(8);
return val;
}