Package hudson.util

Class IOUtils

java.lang.Object
hudson.util.IOUtils

public class IOUtils extends Object
Adds more to commons-io.
Since:
1.337
Author:
Kohsuke Kawaguchi
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static File
    absolutize(File base, String path)
    Resolves the given path with respect to given base.
    static void
    Deprecated.
    Use Java 7 try-with-resources instead.
    static void
    Deprecated.
    Use Java 7 try-with-resources instead.
    static void
    Deprecated.
    Use Java 7 try-with-resources instead.
    static void
    Deprecated.
    Use Java 7 try-with-resources instead.
    static boolean
    Deprecated.
    Use instead IOUtils.contentEquals(java.io.InputStream, java.io.InputStream)
    static boolean
    contentEquals(Reader input1, Reader input2)
    Deprecated.
    Use instead IOUtils.contentEquals(java.io.Reader, java.io.Reader)
    static void
    copy(File src, OutputStream out)
     
    static void
    copy(InputStream in, File out)
     
    static int
    copy(InputStream input, OutputStream output)
    Deprecated.
    Use instead IOUtils.copy(java.io.InputStream, java.io.OutputStream)
    static void
    copy(InputStream input, Writer output)
    Deprecated.
    Use instead IOUtils.copy(java.io.InputStream, java.io.Writer)
    static void
    copy(InputStream input, Writer output, String encoding)
    Deprecated.
    Use instead IOUtils.copy(java.io.InputStream, java.io.Writer, String)
    static void
    copy(Reader input, OutputStream output)
    Deprecated.
    Use instead IOUtils.copy(java.io.Reader, java.io.OutputStream)
    static void
    copy(Reader input, OutputStream output, String encoding)
    Deprecated.
    Use instead IOUtils.copy(java.io.Reader, java.io.OutputStream, String)
    static int
    copy(Reader input, Writer output)
    Deprecated.
    Use instead IOUtils.copy(java.io.Reader, java.io.Writer)
    static long
    Deprecated.
    Use instead IOUtils.copyLarge(java.io.InputStream, java.io.OutputStream)
    static long
    copyLarge(Reader input, Writer output)
    Deprecated.
    Use instead IOUtils.copyLarge(java.io.Reader, java.io.Writer)
    static void
    Drains the input stream and closes it.
    static boolean
    See FilePath.isAbsolute(String).
    static org.apache.commons.io.LineIterator
    lineIterator(InputStream input, String encoding)
    Deprecated.
    Use instead IOUtils.lineIterator(java.io.InputStream, String)
    static org.apache.commons.io.LineIterator
    Deprecated.
    Use instead IOUtils.lineIterator(java.io.Reader)
    static File
    mkdirs(File dir)
    Ensures that the given directory exists (if not, it's created, including all the parent directories.)
    static int
    Gets the mode of a file/directory, if appropriate.
    static String
    Read the first line of the given stream, close it, and return that line.
    static List
    Deprecated.
    Use instead IOUtils.readLines(java.io.InputStream)
    static List
    readLines(InputStream input, String encoding)
    Deprecated.
    Use instead IOUtils.readLines(java.io.InputStream, String)
    static List
    Deprecated.
    Use instead IOUtils.readLines(java.io.Reader)
    skip(InputStream in, long size)
    Deprecated.
    use IOUtils.skipFully(InputStream, long)
    static byte[]
    Deprecated.
    Use instead IOUtils.toByteArray(java.io.InputStream)
    static byte[]
    Deprecated.
    Use instead IOUtils.toByteArray(java.io.Reader)
    static byte[]
    toByteArray(Reader input, String encoding)
    Deprecated.
    Use instead IOUtils.toByteArray(java.io.Reader, String)
    static byte[]
    Deprecated.
    Use instead IOUtils.toByteArray(String)
    static char[]
    Deprecated.
    Use instead IOUtils.toCharArray(java.io.InputStream)
    static char[]
    Deprecated.
    Use instead IOUtils.toCharArray(java.io.InputStream, String)
    static char[]
    Deprecated.
    Use instead IOUtils.toCharArray(java.io.Reader)
    Deprecated.
    Use instead IOUtils.toInputStream(String)
    toInputStream(String input, String encoding)
    Deprecated.
    Use instead IOUtils.toInputStream(String, String)
    static String
    toString(byte[] input)
    Deprecated.
    Use instead IOUtils.toString(byte[])
    static String
    toString(byte[] input, String encoding)
    Deprecated.
    Use instead IOUtils.toString(byte[], String)
    static String
    Deprecated.
    Use instead IOUtils.toString(java.io.InputStream)
    static String
    toString(InputStream input, String encoding)
    Deprecated.
    Use instead IOUtils.toString(java.io.InputStream, String)
    static String
    Deprecated.
    Use instead IOUtils.toString(java.io.Reader)
    static void
    write(byte[] data, OutputStream output)
    Deprecated.
    Use instead IOUtils.write(byte[], java.io.OutputStream)
    static void
    write(byte[] data, Writer output)
    Deprecated.
    Use instead IOUtils.write(byte[], java.io.Writer)
    static void
    write(byte[] data, Writer output, String encoding)
    Deprecated.
    Use instead IOUtils.write(byte[], java.io.Writer, String)
    static void
    write(char[] data, OutputStream output)
    Deprecated.
    Use instead IOUtils.write(char[], java.io.OutputStream)
    static void
    write(char[] data, OutputStream output, String encoding)
    Deprecated.
    Use instead IOUtils.write(char[], java.io.OutputStream, String)
    static void
    write(char[] data, Writer output)
    Deprecated.
    Use instead IOUtils.write(char[], java.io.OutputStream)
    static void
    Deprecated.
    Use instead IOUtils.write(StringBuffer, java.io.OutputStream)
    static void
    write(StringBuffer data, OutputStream output, String encoding)
    Deprecated.
    Use instead IOUtils.write(StringBuffer, java.io.OutputStream, String)
    static void
    write(StringBuffer data, Writer output)
    Deprecated.
    Use instead IOUtils.write(StringBuffer, java.io.Writer)
    static void
    write(String data, OutputStream output)
    Deprecated.
    Use instead IOUtils.write(String, java.io.OutputStream)
    static void
    write(String data, OutputStream output, String encoding)
    Deprecated.
    Use instead IOUtils.write(String, java.io.OutputStream, String)
    static void
    write(String data, Writer output)
    Deprecated.
    Use instead IOUtils.write(char[], java.io.Writer)
    static void
    writeLines(Collection lines, String lineEnding, OutputStream output)
    Deprecated.
    Use instead IOUtils.writeLines(java.util.Collection, String, java.io.OutputStream)
    static void
    writeLines(Collection lines, String lineEnding, OutputStream output, String encoding)
    Deprecated.
    Use instead IOUtils.writeLines(java.util.Collection, String, java.io.OutputStream, String)
    static void
    writeLines(Collection lines, String lineEnding, Writer writer)
    Deprecated.
    Use instead IOUtils.writeLines(java.util.Collection, String, java.io.Writer)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait