org.sonatype.aether.test.util
Class TestFileUtils

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

public class TestFileUtils
extends Object


Constructor Summary
TestFileUtils()
           
 
Method Summary
static void assertContent(byte[] expected, File file)
           
static void assertContent(String expected, File file)
           
static long copy(File source, File target)
           
static File createTempDir()
           
static File createTempDir(String suffix)
           
static File createTempFile(byte[] pattern, int repeat)
           
static File createTempFile(String contents)
           
static void delete(File file)
           
static void deleteTempFiles()
           
static byte[] getContent(File file)
           
static boolean mkdirs(File directory)
           
static void read(Properties props, File file)
           
static void write(byte[] pattern, int repeat, File file)
           
static void write(Properties props, File file)
           
static void write(String content, 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 IOException
Throws:
IOException

createTempFile

public static File createTempFile(String contents)
                           throws IOException
Throws:
IOException

createTempFile

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

write

public static void write(String content,
                         File file)
                  throws IOException
Throws:
IOException

write

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

copy

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

delete

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

getContent

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

assertContent

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

assertContent

public static void assertContent(String expected,
                                 File file)
                          throws IOException
Throws:
IOException

mkdirs

public static boolean mkdirs(File directory)

createTempDir

public static File createTempDir()
                          throws IOException
Throws:
IOException

createTempDir

public static File createTempDir(String suffix)
                          throws IOException
Throws:
IOException

read

public static void read(Properties props,
                        File file)
                 throws IOException
Throws:
IOException

write

public static void write(Properties props,
                         File file)
                  throws IOException
Throws:
IOException


Copyright © 2010-2013. All Rights Reserved.