Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for OutputStreamUtil (0.07 sec)

  1. src/main/java/org/codelibs/core/io/OutputStreamUtil.java

    import org.codelibs.core.exception.IORuntimeException;
    
    /**
     * Utility class for {@link OutputStream} operations.
     *
     * @author shot
     */
    public abstract class OutputStreamUtil {
    
        /**
         * Do not instantiate.
         */
        protected OutputStreamUtil() {
        }
    
        /**
         * Creates a {@link FileOutputStream}.
         *
         * @param file the file (must not be {@literal null})
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/io/PropertiesUtilTest.java

            final Properties outProperties = new Properties();
            outProperties.setProperty("a", "A");
            final File file = tempFolder.newFile("hoge.properties");
            final FileOutputStream outputStream = OutputStreamUtil.create(file);
            PropertiesUtil.store(outProperties, outputStream, "comments");
            CloseableUtil.close(outputStream);
            final Properties properties = new Properties();
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/io/CopyUtil.java

         */
        public static int copy(final InputStream in, final File out) {
            assertArgumentNotNull("in", in);
            assertArgumentNotNull("out", out);
    
            final FileOutputStream os = OutputStreamUtil.create(out);
            try {
                if (in instanceof FileInputStream) {
                    return copyInternal((FileInputStream) in, os);
                }
                return copyInternal(wrap(in), os);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 45.2K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/io/FileUtil.java

         * @param bytes
         *            The byte array to write.
         */
        public static void writeBytes(final String pathname, final byte[] bytes) {
            try (FileOutputStream fos = OutputStreamUtil.create(new File(pathname))) {
                ChannelUtil.write(fos.getChannel(), ByteBuffer.wrap(bytes));
            } catch (final IOException e) {
                throw new IORuntimeException(e);
            }
        }
    
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 8.8K bytes
    - Viewed (0)
Back to top