Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for getResource (0.2 sec)

  1. src/test/java/org/codelibs/core/io/ResourceTraversalTest.java

         */
        @Test
        public void testForEachJarFile() throws Exception {
            final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class";
            final URL classURL = ResourceUtil.getResource(classFilePath);
            final JarURLConnection con = (JarURLConnection) classURL.openConnection();
            ResourceTraversalUtil.forEach(con.getJarFile(), (ResourceHandler) (path, is) -> {
                try {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 6K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/io/ResourceUtilTest.java

        }
    
        /**
         * @throws Exception
         */
        public void testGetResource() throws Exception {
            assertNotNull(ResourceUtil.getResource("java/lang/String.class", "class"));
            assertNotNull(ResourceUtil.getResource("org/codelibs"));
            try {
                ResourceUtil.getResource("hoge", "xml");
                fail("2");
            } catch (final ResourceNotFoundRuntimeException e) {
                System.out.println(e);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/io/ClassTraversalTest.java

         */
        @Test
        public void testForEachJarFile() throws Exception {
            final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class";
            final URL classURL = ResourceUtil.getResource(classFilePath);
            final JarURLConnection con = (JarURLConnection) classURL.openConnection();
            ClassTraversalUtil.forEach(con.getJarFile(), (ClassHandler) (packageName, shortClassName) -> {
                if (count < 10) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/io/ResourceUtil.java

         *
         * @param path
         *            リソースのパス。{@literal null}や空文字列であってはいけません
         * @return リソースの{@link URL}
         * @see #getResource(String, String)
         */
        public static URL getResource(final String path) {
            assertArgumentNotEmpty("path", path);
    
            return getResource(path, null);
        }
    
        /**
         * コンテキストクラスローダからリソースを返します。
         *
         * @param path
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  5. cmd/handler-utils_test.go

    		{"/a/b/c", "test.mydomain.com", nil, "/a/b/c"},
    	}
    	for i, test := range testCases {
    		gotResource, err := getResource(test.p, test.host, test.domains)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if gotResource != test.expectedResource {
    			t.Fatalf("test %d: expected %s got %s", i+1, test.expectedResource, gotResource)
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  6. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

        }
      }
    
      /** Iterate through the hpack-test-case resources, only picking stories for the current draft.  */
      fun storiesForCurrentDraft(): Array<String> {
        val resource =
          HpackJsonUtil::class.java.getResource("/hpack-test-case")
            ?: return arrayOf()
    
        val testCaseDirectory = File(resource.toURI()).toOkioPath()
        val result = mutableListOf<String>()
        for (path in fileSystem.list(testCaseDirectory)) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. maven-compat/src/test/java/org/apache/maven/project/AbstractMavenProjectTestCase.java

                throws FileNotFoundException, URISyntaxException {
            ClassLoader cloader = Thread.currentThread().getContextClassLoader();
    
            URL resourceUrl = cloader.getResource(resource);
    
            if (resourceUrl == null) {
                throw new FileNotFoundException("Unable to find: " + resource);
            }
    
            return new File(resourceUrl.toURI());
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 05:46:50 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  8. maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultSuperPomProvider.java

        }
    
        private Model readModel(String version, String v) {
            String resource = "/org/apache/maven/model/pom-" + v + ".xml";
            URL url = getClass().getResource(resource);
            if (url == null) {
                throw new IllegalStateException("The super POM " + resource + " was not found"
                        + ", please verify the integrity of your Maven installation");
            }
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 3K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/io/FileUtilTest.java

    import java.io.File;
    import java.net.URL;
    
    import org.codelibs.core.net.URLUtil;
    import org.junit.Test;
    
    /**
     * @author koichik
     *
     */
    public class FileUtilTest {
    
        URL url = ResourceUtil.getResource(getClass().getName().replace('.', '/') + ".txt");
    
        File inputFile = URLUtil.toFile(url);
    
        /**
         * @throws Exception
         */
        @Test
        public void testFileToFile() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  10. cmd/signature-v2.go

    	if err != nil {
    		return ErrMalformedExpires
    	}
    
    	// Check if the presigned URL has expired.
    	if expiresInt < UTCNow().Unix() {
    		return ErrExpiredPresignRequest
    	}
    
    	encodedResource, err = getResource(encodedResource, r.Host, globalDomainNames)
    	if err != nil {
    		return ErrInvalidRequest
    	}
    
    	expectedSignature := preSignatureV2(cred, r.Method, encodedResource, strings.Join(filteredQueries, "&"), r.Header, expires)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.2K bytes
    - Viewed (0)
Back to top