- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for openStream (0.5 sec)
-
src/test/java/org/codelibs/core/io/ResourceTraversalTest.java
final URL classURL = ResourceUtil.getResource(classFilePath); final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL(); ResourceTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ResourceHandler) (path, is) -> { try { if (count < 10) { System.out.println(path); } assertThat(path, is(notNullValue()));
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 6K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ClassTraversalTest.java
final URL classURL = ResourceUtil.getResource(classFilePath); final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL(); ClassTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ClassHandler) (packageName, shortClassName) -> { if (count < 10) { System.out.println(ClassUtil.concatName(packageName, shortClassName)); }
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 5.1K bytes - Viewed (0) -
src/test/java/org/codelibs/opensearch/extension/analysis/SynonymLoader.java
if (file.exists()) { reloadableFile = file; } reader = new BufferedReader(new InputStreamReader(path.toUri().toURL().openStream(), StandardCharsets.UTF_8)); } catch (final Exception e) { throw new IllegalArgumentException("Failed to read " + filePath, e); }
Registered: Wed Jun 12 15:38:08 UTC 2024 - Last Modified: Thu Feb 22 01:36:54 UTC 2024 - 6.7K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/ResourceUtil.java
public static InputStream getResourceAsStream(final String path, final String extension) { assertArgumentNotEmpty("path", path); final URL url = getResource(path, extension); return URLUtil.openStream(url); } /** * コンテキストクラスローダからリソースを検索してストリームとして返します。 リソースが見つからなかった場合は<code>null</code> * を返します。 * * @param path * リソースのパス。{@literal null}や空文字列であってはいけません
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 15.8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/CopyUtil.java
*/ public static int copy(final URL in, final OutputStream out) { assertArgumentNotNull("in", in); assertArgumentNotNull("out", out); final InputStream is = URLUtil.openStream(in); try { if (out instanceof FileOutputStream) { return copyInternal(wrap(is), (FileOutputStream) out); } return copyInternal(wrap(is), wrap(out));
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 52.4K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/TraversalUtil.java
this.zipUrl = zipUrl; this.prefix = prefix; } private void loadFromZip(final URL zipUrl) { final ZipInputStream zis = new ZipInputStream(URLUtil.openStream(zipUrl)); try { ZipEntry entry = null; while ((entry = ZipInputStreamUtil.getNextEntry(zis)) != null) { entryNames.add(entry.getName());
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 19.5K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
final URL url = ResourceUtil.getResource(path); if (url.getProtocol().equals("file")) { return readText(URLUtil.toFile(url), encoding); } final InputStream is = URLUtil.openStream(url); try { final Reader reader = ReaderUtil.create(new BufferedInputStream(is, DEFAULT_BUF_SIZE), encoding); return read(reader, DEFAULT_BUF_SIZE); } finally {
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 9K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/PropertiesUtil.java
*/ public static void load(final Properties props, final URL url) { assertArgumentNotNull("props", props); assertArgumentNotNull("url", url); final InputStream in = URLUtil.openStream(url); try { props.load(in); } catch (final IOException e) { throw new IORuntimeException(e); } finally { CloseableUtil.close(in); }
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 8.9K bytes - Viewed (0) -
src/main/java/org/codelibs/core/net/URLUtil.java
/** * URLをオープンして{@link InputStream}を返します。 * * @param url * URL。{@literal null}であってはいけません * @return URLが表すリソースを読み込むための{@link InputStream} */ public static InputStream openStream(final URL url) { assertArgumentNotNull("url", url); try { final URLConnection connection = url.openConnection(); connection.setUseCaches(false);
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 7.3K bytes - Viewed (0)