Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for isOpen (0.07 sec)

  1. src/test/java/jcifs/SmbPipeHandleTest.java

            /**
             * Verifies that the isOpen method returns true for an open handle.
             */
            @Test
            public void testIsOpen_ReturnsTrueWhenOpen() {
                when(smbPipeHandle.isOpen()).thenReturn(true);
                assertTrue(smbPipeHandle.isOpen(), "isOpen() should return true when the handle is open.");
            }
    
            /**
             * Verifies that the isOpen method returns false for a closed handle.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbPipeOutputStreamTest.java

        @DisplayName("isOpen delegates to handle.isOpen")
        void isOpen_delegates(boolean state) throws Exception {
            // Arrange
            SmbPipeOutputStream out = newStream();
            when(handle.isOpen()).thenReturn(state);
    
            // Act
            boolean result = out.isOpen();
    
            // Assert
            assertEquals(state, result, "isOpen should reflect handle state");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb/SmbPipeOutputStream.java

            super(handle.getPipe(), th, null, 0, 0, 0);
            this.handle = handle;
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.smb.SmbFileOutputStream#isOpen()
         */
        @Override
        public boolean isOpen() {
            return this.handle.isOpen();
        }
    
        @Override
        protected synchronized SmbTreeHandleImpl ensureTreeConnected() throws CIFSException {
            return this.handle.ensureTreeConnected();
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java

        }
    
        @Test
        void testClose() throws SmbException {
            // Mock isOpen to return false after close
            doAnswer(new Answer<Void>() {
                @Override
                public Void answer(InvocationOnMock invocation) throws Throwable {
                    when(smbFile.isOpen()).thenReturn(false);
                    return null;
                }
            }).when(smbFile).close(anyLong());
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  5. src/main/java/jcifs/SmbPipeHandle.java

         */
        @Override
        void close() throws CIFSException;
    
        /**
         * Tests whether this file descriptor is open and valid.
         *
         * @return whether the FD is open and valid
         */
        boolean isOpen();
    
        /**
         * Tests whether this file descriptor was previously open but has become invalid.
         *
         * @return whether the FD was previously open but became invalid
         */
        boolean isStale();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

                      override fun peek() = exchange.peekTrailers()
    
                      override fun get(): Headers {
                        val source = responseBody.source()
                        if (source.isOpen) {
                          source.skipAll()
                        }
                        return peek() ?: error("null trailers after exhausting response body?!")
                      }
                    },
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 22:04:11 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/smb1/SmbTree.java

         */
        int connectionState;
        int tid;
    
        String share;
        String service = "?????";
        String service0;
        SmbSession session;
        boolean inDfs, inDomainDfs;
        int tree_num; // used by SmbFile.isOpen
    
        SmbTree(final SmbSession session, final String share, final String service) {
            this.session = session;
            this.share = share.toUpperCase();
            if (service != null && !service.startsWith("??")) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/dcerpc/DcerpcPipeHandle.java

        }
    
        @Override
        protected void doSendFragment(final byte[] buf, final int off, final int length, final boolean isDirect) throws IOException {
            if (out != null && !out.isOpen()) {
                throw new IOException("DCERPC pipe is no longer open");
            }
    
            if (in == null) {
                in = (SmbFileInputStream) pipe.getNamedPipeInputStream();
            }
            if (out == null) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb2/rdma/tcp/TcpRdmaConnection.java

            return response;
        }
    
        @Override
        public void reset() throws IOException {
            if (socketChannel != null && socketChannel.isOpen()) {
                socketChannel.close();
            }
            connect();
        }
    
        @Override
        public int read(ByteBuffer buffer, long remoteAddress, int remoteKey, int length) throws IOException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  10. cmd/os-instrumented.go

    	// .... add more
    
    	osMetricLast
    )
    
    var globalOSMetrics osMetrics
    
    func init() {
    	// Inject metrics.
    	ioutilx.OsOpenFile = OpenFile
    	ioutilx.OpenFileDirectIO = OpenFileDirectIO
    	ioutilx.OsOpen = Open
    }
    
    type osMetrics struct {
    	// All fields must be accessed atomically and aligned.
    	operations [osMetricLast]uint64
    	latency    [osMetricLast]lockedLastMinuteLatency
    }
    
    // time an os action.
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 6.2K bytes
    - Viewed (0)
Back to top