org.mashupbots.socko.infrastructure

IOUtil

object IOUtil

Utility IO methods

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. IOUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def createTempDir(namePrefix: String): File

    Returns a newly created temporary directory in the system defined temporary directory

    Returns a newly created temporary directory in the system defined temporary directory

    namePrefix

    Prefix to use on the directory name

    returns

    Newly created directory

  9. def deleteDir(dir: File): Unit

    Delete the specified directory and all sub directories

    Delete the specified directory and all sub directories

    dir

    Directory to delete

  10. def deleteDirContents(dir: File): Unit

    Delete all the contents (files and sub-directories) of the specified directory

    Delete all the contents (files and sub-directories) of the specified directory

    dir

    Directory

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. def isAbsolutePath(path: String): Boolean

    Tests if a path string is an absolute path or not

    Tests if a path string is an absolute path or not

    Assumes that an absolute path starts with the file separator of if on windows, it starts with a drive letter.

  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def pipe(bytesIn: InputStream, bytesOut: OutputStream): Unit

    Pipe input to output stream using 8K blocks

    Pipe input to output stream using 8K blocks

    bytesIn

    Input stream

    bytesOut

    Output stream

  22. def readFile(file: File): Array[Byte]

    Returns the contents of a file as bytes.

    Returns the contents of a file as bytes. Throws FileNotFoundException if the file is not found.

    file

    File to read

  23. def readFile(filePath: String): Array[Byte]

    Returns the contents of a file as bytes.

    Returns the contents of a file as bytes. Throws FileNotFoundException if the file is not found.

    filePath

    Full path to file to read

  24. def readInputStream(is: InputStream): Array[Byte]

    Read bytes from an input stream.

    Read bytes from an input stream. The input stream will be closed by this method after reading

    is

    Input stream

  25. def readResource(classpath: String): Array[Byte]

    Returns the contents of a resource as bytes; null if the resource was not found.

    Returns the contents of a resource as bytes; null if the resource was not found.

    classpath

    Class path of the resource in the classpath. Do **NOT** put a leading "/". See article

  26. def recursiveListFiles(f: File, r: Regex): Array[File]

    Returns a list of all files in a directory and its sub-directories matching the specified regular expression

    Returns a list of all files in a directory and its sub-directories matching the specified regular expression

    f

    Directory to look under

    r

    Regular expression to match file names

    See also

    http://stackoverflow.com/questions/2637643/how-do-i-list-all-files-in-a-subdirectory-in-scala

  27. def recursiveListFiles(f: File): Array[File]

    Returns a list of all files in a directory and its sub-directories

    Returns a list of all files in a directory and its sub-directories

    f

    Directory to look under

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. def using[T <: AnyRef { def close(): Unit }, A](resource: T)(block: (T) ⇒ A): A

    Auto close streams with automatic resource management

    Auto close streams with automatic resource management

    Also see Programming in Scala Second Edition Chapter 20.8.

    Example usage

    using(new BufferedReader(new FileReader("file"))) { r =>
    var count = 0
    while (r.readLine != null) count += 1
    println(count)
    }
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def writeTextFile(file: File, text: String, charset: Charset = CharsetUtil.UTF_8): File

    Write a text file

    Write a text file

    file

    File to write to. If the file exists, it will be overwritten

    text

    Text to write to the file

    charset

    Character set. Defaults to UTF-8.

    returns

    file

Inherited from AnyRef

Inherited from Any

Ungrouped