org.sonatype.aether.test.util
Class TestFileUtils

java.lang.Object
  extended by org.sonatype.aether.test.util.TestFileUtils

public class TestFileUtils
extends java.lang.Object


Constructor Summary
TestFileUtils()
           
 
Method Summary
static void assertContent(byte[] expected, java.io.File file)
           
static void assertContent(java.lang.String expected, java.io.File file)
           
static long copy(java.io.File source, java.io.File target)
           
static java.io.File createTempDir()
           
static java.io.File createTempDir(java.lang.String suffix)
           
static java.io.File createTempFile(byte[] pattern, int repeat)
           
static java.io.File createTempFile(java.lang.String contents)
           
static void delete(java.io.File file)
           
static void deleteTempFiles()
           
static byte[] getContent(java.io.File file)
           
static boolean mkdirs(java.io.File directory)
           
static void read(java.util.Properties props, java.io.File file)
           
static void write(byte[] pattern, int repeat, java.io.File file)
           
static void write(java.util.Properties props, java.io.File file)
           
static void write(java.lang.String content, java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestFileUtils

public TestFileUtils()
Method Detail

deleteTempFiles

public static void deleteTempFiles()
                            throws java.io.IOException
Throws:
java.io.IOException

createTempFile

public static java.io.File createTempFile(java.lang.String contents)
                                   throws java.io.IOException
Throws:
java.io.IOException

createTempFile

public static java.io.File createTempFile(byte[] pattern,
                                          int repeat)
                                   throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(java.lang.String content,
                         java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(byte[] pattern,
                         int repeat,
                         java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException

copy

public static long copy(java.io.File source,
                        java.io.File target)
                 throws java.io.IOException
Throws:
java.io.IOException

delete

public static void delete(java.io.File file)
                   throws java.io.IOException
Throws:
java.io.IOException

getContent

public static byte[] getContent(java.io.File file)
                         throws java.io.IOException
Throws:
java.io.IOException

assertContent

public static void assertContent(byte[] expected,
                                 java.io.File file)
                          throws java.io.IOException
Throws:
java.io.IOException

assertContent

public static void assertContent(java.lang.String expected,
                                 java.io.File file)
                          throws java.io.IOException
Throws:
java.io.IOException

mkdirs

public static boolean mkdirs(java.io.File directory)

createTempDir

public static java.io.File createTempDir()
                                  throws java.io.IOException
Throws:
java.io.IOException

createTempDir

public static java.io.File createTempDir(java.lang.String suffix)
                                  throws java.io.IOException
Throws:
java.io.IOException

read

public static void read(java.util.Properties props,
                        java.io.File file)
                 throws java.io.IOException
Throws:
java.io.IOException

write

public static void write(java.util.Properties props,
                         java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.