@Override
    protected int readBytesWireFormat ( byte[] buffer, int bufferIndex ) throws SMBProtocolDecodingException {
        int start = bufferIndex;
        int structureSize = SMBUtil.readInt2(buffer, bufferIndex);
        if ( structureSize == 9 ) {
            return this.readErrorResponse(buffer, bufferIndex);
        }
        else if ( structureSize != 17 ) {
            throw new SMBProtocolDecodingException("Expected structureSize = 17");
        }

        short dataOffset = buffer[ bufferIndex + 2 ];
        bufferIndex += 4;
        this.dataLength = SMBUtil.readInt4(buffer, bufferIndex);
        bufferIndex += 4;
        this.dataRemaining = SMBUtil.readInt4(buffer, bufferIndex);
        bufferIndex += 4;
        bufferIndex += 4; // Reserved2

        int dataStart = getHeaderStart() + dataOffset;

        if ( this.dataLength + this.outputBufferOffset > this.outputBuffer.length ) {
            throw new SMBProtocolDecodingException("Buffer to small for read response");
        }
        System.arraycopy(buffer, dataStart, this.outputBuffer, this.outputBufferOffset, this.dataLength);
        bufferIndex = Math.max(bufferIndex, dataStart + this.dataLength);
        return bufferIndex - start;
    }
@ Override protected int readBytesWireFormat ( byte [ ] buffer , int bufferIndex ) throws SMBProtocolDecodingException { int start = bufferIndex ; int structureSize = SMBUtil . readInt2 ( buffer , bufferIndex ) ; if ( structureSize == 9 ) { return this . readErrorResponse ( buffer , bufferIndex ) ; } else if ( structureSize != 17 ) { throw new SMBProtocolDecodingException ( "Expected structureSize = 17" ) ; } short dataOffset = buffer [ bufferIndex + 2 ] ; bufferIndex += 4 ; this . dataLength = SMBUtil . readInt4 ( buffer , bufferIndex ) ; bufferIndex += 4 ; this . dataRemaining = SMBUtil . readInt4 ( buffer , bufferIndex ) ; bufferIndex += 4 ; bufferIndex += 4 ; int dataStart = getHeaderStart ( ) + dataOffset ; if ( this . dataLength + this . outputBufferOffset > this . outputBuffer . length ) { throw new SMBProtocolDecodingException ( "Buffer to small for read response" ) ; } System . arraycopy ( buffer , dataStart , this . outputBuffer , this . outputBufferOffset , this . dataLength ) ; bufferIndex = Math . max ( bufferIndex , dataStart + this . dataLength ) ; return bufferIndex - start ; }
{@inheritDoc}

@see jcifs.internal.smb2.ServerMessageBlock2#readBytesWireFormat(byte[], int)