bb.io
Class FileUtil.UnitTest

java.lang.Object
  extended by bb.io.FileUtil.UnitTest
Enclosing class:
FileUtil

public static class FileUtil.UnitTest
extends Object

See the Overview page of the project's javadocs for a general description of this unit test class.


Constructor Summary
FileUtil.UnitTest()
           
 
Method Summary
 void benchmark_readBytes()
          Measures how long it takes to read up to 100 MB.
 void benchmark_readBytesEnd()
          Measures how long it takes to read up to 1 MB of data that occurs at the end of files.
 void test_changeExtension()
           
 void test_copy_compareContents()
           
 void test_delete()
           
 void test_getParentRelativeTo()
           
 void test_getRelativePath()
           
 void test_getXXXExtension()
           
 void test_move()
           
 void test_readChars()
           
 void test_rename()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil.UnitTest

public FileUtil.UnitTest()
Method Detail

test_getXXXExtension

public void test_getXXXExtension()

test_changeExtension

public void test_changeExtension()
                          throws Exception
Throws:
Exception

test_getRelativePath

public void test_getRelativePath()

test_getParentRelativeTo

public void test_getParentRelativeTo()

test_delete

public void test_delete()
                 throws Exception
Throws:
Exception

test_move

public void test_move()
               throws Exception
Throws:
Exception

test_rename

public void test_rename()
                 throws Exception
Throws:
Exception

test_copy_compareContents

public void test_copy_compareContents()
                               throws Exception
Throws:
Exception

benchmark_readBytes

public void benchmark_readBytes()
                         throws Exception
Measures how long it takes to read up to 100 MB.

Results on 2009-03-16 (2.5 GHz Xeon E5420 desktop, jdk 1.6.0_11 server jvm):


                        Read 2045 files, 105620961 bytes
                        Time = 2.952956956 s
                        Rate = 3.576786339042051E7 bytes/second
 

Throws:
Exception

benchmark_readBytesEnd

public void benchmark_readBytesEnd()
                            throws Exception
Measures how long it takes to read up to 1 MB of data that occurs at the end of files.

Results on 2009-03-16 (2.5 GHz Xeon E5420 desktop, jdk 1.6.0_11 server jvm):


                        Read 1119 files, 1000699 bytes
                        Time = 113.08593300000001 ms
                        Rate = 8849013.961798413 bytes/second
 

Throws:
Exception

test_readChars

public void test_readChars()
                    throws Exception
Throws:
Exception