- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for ByteArrayInputStream (0.15 sec)
-
src/test/java/jcifs/spnego/SpnegoExceptionTest.java
oout.writeObject(original); oout.flush(); bytes = bout.toByteArray(); } SpnegoException restored; try (ByteArrayInputStream bin = new ByteArrayInputStream(bytes); ObjectInputStream oin = new ObjectInputStream(bin)) { restored = (SpnegoException) oin.readObject(); } // Then assertNotNull(restored);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/netbios/SessionRequestPacketTest.java
byte[] buffer = new byte[256]; int written = writePacket.writeTrailerWireFormat(buffer, 0); ByteArrayInputStream bais = new ByteArrayInputStream(buffer, 0, written); SessionRequestPacket readPacket = new SessionRequestPacket(mockConfig); readPacket.length = written;Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/smb1/netbios/SocketInputStreamTest.java
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.2K bytes - Viewed (0) -
src/test/java/jcifs/pac/PacLogonInfoTest.java
// 116444736000000000L represents January 1, 1970 (Unix epoch) in Windows FILETIME long epochFiletime = 116444736000000000L; writeLittleEndianLong(dos, epochFiletime); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); PacDataInputStream pacStream = new PacDataInputStream(bais); Date date = pacStream.readFiletime(); assertNotNull(date);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.3K bytes - Viewed (0) -
src/main/java/jcifs/pac/PacSignature.java
* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcifs.pac; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; /** * Represents a PAC signature structure containing checksum type and data.
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 3.4K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/msrpc/netdfsTest.java
byte[] encodeBuffer = new byte[1024]; NdrBuffer dst = new NdrBuffer(encodeBuffer, 0); info1.encode(dst); ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); // Use the encoded buffer for decoding NdrBuffer src = new NdrBuffer(encodeBuffer, 0); netdfs.DfsInfo1 decodedInfo1 = new netdfs.DfsInfo1();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 30.9K bytes - Viewed (0) -
src/test/java/jcifs/pac/ASN1UtilTest.java
// Test successful reading and casting from ASN1InputStream ASN1Integer original = new ASN1Integer(456); ByteArrayInputStream bais = new ByteArrayInputStream(original.getEncoded()); ASN1InputStream ais = new ASN1InputStream(bais); ASN1Integer result = ASN1Util.as(ASN1Integer.class, ais); assertEquals(original, result); }Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.4K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/TransportTest.java
InputStream is = new ByteArrayInputStream("test".getBytes()); assertThrows(IOException.class, () -> Transport.readn(is, new byte[5], 0, 10)); } @Test @DisplayName("readn should return 0 when no more bytes available") void shouldReturnZeroWhenStreamEmpty() throws IOException { InputStream is = new ByteArrayInputStream("Hi".getBytes());Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0) -
src/main/java/jcifs/smb/compression/DefaultCompressionService.java
/** * Decompresses LZ77+Huffman data. */ private byte[] decompressLZ77Huffman(byte[] compressedData, int offset, int length) throws CIFSException { try { ByteArrayInputStream bais = new ByteArrayInputStream(compressedData, offset, length); InflaterInputStream inflaterStream = new InflaterInputStream(bais); ByteArrayOutputStream baos = new ByteArrayOutputStream();Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 11.2K bytes - Viewed (0) -
src/test/java/jcifs/netbios/SessionServicePacketTest.java
@DisplayName("readn should read complete data when available") void testReadnComplete() throws IOException { byte[] buffer = new byte[10]; byte[] data = { 1, 2, 3, 4, 5 }; ByteArrayInputStream bais = new ByteArrayInputStream(data); int bytesRead = SessionServicePacket.readn(bais, buffer, 0, 5); assertEquals(5, bytesRead); for (int i = 0; i < 5; i++) {Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.5K bytes - Viewed (0)