Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for inv (0.01 sec)

  1. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

            SmbRandomAccessFile raf = spy(newInstance("r", false, false, false));
            // For each 1-byte read, fill provided buffer with 0xFF/0x01
            doAnswer(inv -> {
                byte[] b = inv.getArgument(0);
                int off = inv.getArgument(1);
                b[off] = (byte) 0xFF;
                return 1;
            }).when(raf).read(any(byte[].class), anyInt(), eq(1));
            assertTrue(raf.readBoolean());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

            // send() answer that mutates the provided response
            when(tree.send(any(Trans2FindFirst2.class), any(Trans2FindFirst2Response.class))).thenAnswer((InvocationOnMock inv) -> {
                Trans2FindFirst2Response resp = inv.getArgument(1);
                // First response content
                FE[] res = java.util.Arrays.stream(batches.get(0)).map(FE::new).toArray(FE[]::new);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SIDCacheImplTest.java

            jcifs.SID[] in = new jcifs.SID[] { s1, s2 };
    
            // Stub sendrecv to emulate successful RPC response
            doAnswer(inv -> {
                // Capture the outgoing RPC and populate result fields as the server would
                Object msg = inv.getArgument(0);
                assertTrue(msg instanceof jcifs.dcerpc.msrpc.MsrpcLookupSids);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java

            // Mock both sends and return response
            when(tree.send(any(TransWaitNamedPipe.class), any(TransWaitNamedPipeResponse.class))).thenAnswer(inv -> inv.getArgument(1));
            when(tree.send(any(TransCallNamedPipe.class), any(TransCallNamedPipeResponse.class))).thenAnswer(inv -> inv.getArgument(1));
    
            int n = handle.sendrecv(new byte[3], 0, 3, new byte[8], 64);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/DirFileEntryEnumIterator2Test.java

            // Track query count to handle multiple queries properly
            final int[] queryCount = { 0 };
    
            // Mock send(create) to wire a query response with fe1, fe2
            doAnswer(inv -> {
                Object arg = inv.getArgument(0);
                if (arg instanceof Smb2CreateRequest) {
                    Smb2CreateRequest create = (Smb2CreateRequest) arg;
                    // Initialize response chain (also for chained query)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbTransportInternalTest.java

        void disconnect_flagCombinations(boolean hard, boolean inuse, boolean expected) throws Exception {
            when(transport.disconnect(anyBoolean(), anyBoolean())).thenAnswer(inv -> {
                boolean h = inv.getArgument(0);
                boolean u = inv.getArgument(1);
                // Arbitrary behavior mapping for test purposes
                return (h && !u) || (!h && u);
            });
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/LmhostsTest.java

                        });
                        when(mock.read(any(byte[].class), any(int.class), any(int.class))).thenAnswer(inv -> {
                            byte[] buffer = inv.getArgument(0);
                            int offset = inv.getArgument(1);
                            int length = inv.getArgument(2);
                            int remaining = includeContent.length - index[0];
                            if (remaining <= 0) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

            when(tree.getConfig()).thenReturn(config);
            when(config.getPid()).thenReturn(1234);
    
            // Stub send to populate the provided response instance via reflection
            Mockito.doAnswer(inv -> {
                Object resp = inv.getArgument(1);
                // Set private fields: status on SmbComTransactionResponse and available on TransPeekNamedPipeResponse
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  9. src/archive/tar/strconv.go

    		// If the number is negative, we use an inversion mask to invert the
    		// data bytes and treat the value as an unsigned number.
    		var inv byte // 0x00 if positive or zero, 0xff if negative
    		if b[0]&0x40 != 0 {
    			inv = 0xff
    		}
    
    		var x uint64
    		for i, c := range b {
    			c ^= inv // Inverts c only if inv is 0xff, otherwise does nothing
    			if i == 0 {
    				c &= 0x7f // Ignore signal bit in first byte
    			}
    			if (x >> 56) > 0 {
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon Sep 08 17:08:20 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbFileInputStreamTest.java

                Smb2ReadResponse smb2Resp = mock(Smb2ReadResponse.class);
                when(smb2Resp.getDataLength()).thenReturn(3);
                when(mockTree.send(any(Request.class), any(RequestParam.class))).thenAnswer(inv -> (CommonServerMessageBlockResponse) smb2Resp);
    
                byte[] buf = new byte[16];
    
                // Skip advances internal file pointer; next read should use this offset
                in.skip(2);
    
                // Act
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.8K bytes
    - Viewed (0)
Back to top