Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for getResourceAsStream (0.35 sec)

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

     *
     */
    public class InputStreamUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testGetBytes() throws Exception {
            final InputStream is = ResourceUtil.getResourceAsStream(StringUtil.replace(getClass().getName(), ".", "/") + ".class");
            try {
                assertNotNull("1", InputStreamUtil.getBytes(is));
            } finally {
                is.close();
            }
        }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/net/MimeTypeUtilTest.java

            final String path = ClassUtil.getPackageName(this.getClass()).replaceAll("\\.", "/") + "/bbb.html";
            final String s = URLConnection.guessContentTypeFromStream(ResourceUtil.getResourceAsStream(path));
            assertNull(s);
            final String contentType = MimeTypeUtil.guessContentType(path);
            assertEquals("text/html", contentType);
        }
    
        /**
         * Test method for
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java

            Properties props = new Properties();
    
            String resource = "META-INF/maven/org.apache.maven/maven-core/pom.properties";
    
            try (InputStream is = DefaultRuntimeInformation.class.getResourceAsStream("/" + resource)) {
                if (is != null) {
                    props.load(is);
                } else {
                    logger.warn("Could not locate " + resource + " on classpath, Maven runtime information not available");
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Dec 18 11:03:17 GMT 2023
    - 4K bytes
    - Viewed (0)
  4. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/hpackjson/HpackJsonUtil.kt

            String.format(
              "/hpack-test-case/%s/story_%02d.json",
              testFolderName,
              i,
            )
          val storyInputStream =
            HpackJsonUtil::class.java.getResourceAsStream(storyResourceName)
              ?: break
          try {
            storyInputStream.use {
              val story =
                readStory(storyInputStream.source().buffer())
                  .copy(fileName = storyResourceName)
    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)
  5. src/main/java/org/codelibs/core/net/MimeTypeUtil.java

         * @return コンテントタイプ
         */
        public static String guessContentType(final String path) {
            assertArgumentNotEmpty("path", path);
    
            final InputStream is = ResourceUtil.getResourceAsStream(path);
            try {
                final String mimetype = URLConnection.guessContentTypeFromStream(is);
                if (mimetype != null) {
                    return mimetype;
                }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/util/GsaConfigParserTest.java

        }
    
        public void test_parse() throws IOException {
            GsaConfigParser parser = new GsaConfigParser();
            try (InputStream is = ResourceUtil.getResourceAsStream("data/gsaconfig.xml")) {
                parser.parse(new InputSource(is));
            }
            parser.getWebConfig().ifPresent(c -> {
                System.out.println(c.toString());
            }).orElse(() -> fail());
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3K bytes
    - Viewed (0)
  7. maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java

                ClassLoader docLoader = initializeDocLoader();
    
                for (String root : EXPRESSION_ROOTS) {
                    try (InputStream docStream =
                            docLoader.getResourceAsStream(EXPRESSION_DOCO_ROOTPATH + root + ".paramdoc.xml")) {
                        if (docStream != null) {
                            Map<String, Expression> doco = parseExpressionDocumentation(docStream);
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Sep 06 11:28:54 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

            "Parsing: <http://0Xc0.0250.01> against <http://other.com/>",
          )
    
        private fun loadTests(): List<WebPlatformUrlTestData> {
          val resourceAsStream =
            WebPlatformUrlTest::class.java.getResourceAsStream(
              "/web-platform-test-urltestdata.txt",
            )
          val source = resourceAsStream.source().buffer()
          return WebPlatformUrlTestData.load(source)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/util/MimeMap.java

        private byte[] in;
        private int inLen;
    
        public MimeMap() throws IOException {
            int n;
    
            in = new byte[IN_SIZE];
            InputStream is = getClass().getClassLoader().getResourceAsStream( "jcifs/smb1/util/mime.map" );
    
            inLen = 0;
            while(( n = is.read( in, inLen, IN_SIZE - inLen )) != -1 ) {
                inLen += n;
            }
            if( inLen < 100 || inLen == IN_SIZE ) {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 4.2K bytes
    - Viewed (0)
  10. maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java

            final ProjectBuildingRequest buildingRequest = newBuildingRequest();
    
            try (InputStream pomResource =
                    DefaultMavenProjectBuilderTest.class.getResourceAsStream("/projects/reread/pom1.xml")) {
                Files.copy(pomResource, pom, StandardCopyOption.REPLACE_EXISTING);
            }
    
            MavenProject project =
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Jun 19 15:04:04 GMT 2023
    - 16.5K bytes
    - Viewed (0)
Back to top