- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 18 for writeWireFormat (0.37 seconds)
-
src/main/java/jcifs/netbios/SessionServicePacket.java
* * @param dst the destination byte array to write to * @param dstIndex the starting index in the destination array * @return written bytes */ public int writeWireFormat(final byte[] dst, final int dstIndex) { this.length = writeTrailerWireFormat(dst, dstIndex + HEADER_LENGTH); writeHeaderWireFormat(dst, dstIndex); return HEADER_LENGTH + this.length; }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 5.2K bytes - Click Count (0) -
src/test/java/jcifs/netbios/SessionServicePacketTest.java
// Tests for instance methods @Test @DisplayName("writeWireFormat should write header and trailer") void testWriteWireFormat() { packet.type = SessionServicePacket.SESSION_MESSAGE; packet.trailerLength = 10; // Mock trailer will write 10 bytes byte[] dst = new byte[50]; int totalWritten = packet.writeWireFormat(dst, 0); assertEquals(14, totalWritten); // 4 header + 10 trailerCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.5K bytes - Click Count (0) -
src/test/java/jcifs/netbios/NameServicePacketTest.java
packet.questionClass = NameServicePacket.IN; when(mockQuestionName.writeWireFormat(any(byte[].class), anyInt())).thenReturn(10); // Mock name length int written = packet.writeQuestionSectionWireFormat(dst, 0); assertEquals(14, written); // 10 (name) + 2 (type) + 2 (class) verify(mockQuestionName).writeWireFormat(dst, 0); assertEquals((byte) 0x00, dst[10]); // questionType high byteCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 17.9K bytes - Click Count (0) -
src/main/java/jcifs/netbios/NameServicePacket.java
this.config = config; this.isRecurDesired = true; this.isBroadcast = true; this.questionCount = 1; this.questionClass = IN; } int writeWireFormat(final byte[] dst, int dstIndex) { final int start = dstIndex; dstIndex += writeHeaderWireFormat(dst, dstIndex); dstIndex += writeBodyWireFormat(dst, dstIndex); return dstIndex - start;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 11.1K bytes - Click Count (0) -
src/main/java/jcifs/smb1/netbios/NameServicePacket.java
InetAddress addr; NameServicePacket() { isRecurDesired = true; isBroadcast = true; questionCount = 1; questionClass = IN; } int writeWireFormat(final byte[] dst, int dstIndex) { final int start = dstIndex; dstIndex += writeHeaderWireFormat(dst, dstIndex); dstIndex += writeBodyWireFormat(dst, dstIndex); return dstIndex - start;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 10.6K bytes - Click Count (0) -
src/main/java/jcifs/smb1/netbios/NbtSocket.java
final OutputStream out = super.getOutputStream(); final SessionServicePacket ssp0 = new SessionRequestPacket(calledName, NbtAddress.localhost.hostName); out.write(buffer, 0, ssp0.writeWireFormat(buffer, 0)); setSoTimeout(soTimeout); type = SessionServicePacket.readPacketType(in, buffer, 0); } catch (final IOException ioe) { close(); throw ioe;
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 6.1K bytes - Click Count (0) -
src/main/java/jcifs/smb1/netbios/SessionServicePacket.java
* * @param dst the destination byte array to write to * @param dstIndex the starting index in the destination array * @return the number of bytes written */ public int writeWireFormat(final byte[] dst, final int dstIndex) { length = writeTrailerWireFormat(dst, dstIndex + HEADER_LENGTH); writeHeaderWireFormat(dst, dstIndex); return HEADER_LENGTH + length; }Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 5.2K bytes - Click Count (0) -
src/main/java/jcifs/netbios/Name.java
* * @return whether this is the unknown address */ public boolean isUnknown() { return "0.0.0.0".equals(this.name) && this.hexCode == 0 && this.scope == null; } int writeWireFormat(final byte[] dst, final int dstIndex) { // write 0x20 in first byte dst[dstIndex] = 0x20; final byte tmp[] = Strings.getOEMBytes(this.name, this.config); int i;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 8K bytes - Click Count (0) -
src/main/java/jcifs/smb1/netbios/Name.java
} this.name = name.toUpperCase(); this.hexCode = hexCode; this.scope = scope != null && scope.length() > 0 ? scope : DEFAULT_SCOPE; this.srcHashCode = 0; } int writeWireFormat(final byte[] dst, final int dstIndex) { // write 0x20 in first byte dst[dstIndex] = 0x20; // write name try { final byte tmp[] = name.getBytes(Name.OEM_ENCODING);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 7.2K bytes - Click Count (0) -
src/main/java/jcifs/netbios/SessionRequestPacket.java
} @Override int writeTrailerWireFormat(final byte[] dst, int dstIndex) { final int start = dstIndex; dstIndex += this.calledName.writeWireFormat(dst, dstIndex); dstIndex += this.callingName.writeWireFormat(dst, dstIndex); return dstIndex - start; } @Override int readTrailerWireFormat(final InputStream in, final byte[] buffer, int bufferIndex) throws IOException {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 2.7K bytes - Click Count (0)