Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for setURLStreamHandlerFactory (1.23 sec)

  1. src/test/java/jcifs/http/HandlerTest.java

            URLStreamHandlerFactory mockFactory2 = mock(URLStreamHandlerFactory.class);
    
            Handler.setURLStreamHandlerFactory(mockFactory1); // First call, should succeed.
    
            assertThrows(IllegalStateException.class, () -> {
                Handler.setURLStreamHandlerFactory(mockFactory2); // Second call, should fail.
            }, "Setting the factory a second time should throw IllegalStateException.");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb1/http/Handler.java

         * stream handlers.  This can be called once per JVM instance.
         *
         * @param factory The URL stream handler factory.
         */
        public static void setURLStreamHandlerFactory(final URLStreamHandlerFactory factory) {
            synchronized (PROTOCOL_HANDLERS) {
                if (Handler.factory != null) {
                    throw new IllegalStateException("URLStreamHandlerFactory already set.");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

        @BeforeAll
        static void registerSmbHandler() {
            if (!handlerRegistered) {
                try {
                    // Try to register the handler factory
                    URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
                        @Override
                        public URLStreamHandler createURLStreamHandler(String protocol) {
                            if ("smb".equals(protocol)) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  4. src/main/java/jcifs/http/Handler.java

         * stream handlers. This can be called once per JVM instance.
         *
         * @param factory
         *            The URL stream handler factory.
         */
        public static void setURLStreamHandlerFactory(final URLStreamHandlerFactory factory) {
            synchronized (PROTOCOL_HANDLERS) {
                if (Handler.factory != null) {
                    throw new IllegalStateException("URLStreamHandlerFactory already set.");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.9K bytes
    - Viewed (0)
Back to top