Coding Tips

The following tips will help you along while coding Cargo containers

File I/O

FileHandler

FileHandler exposes many methods that you will need to implement Cargo containers and configurations.  Its default implementation VFSFileHandler supports temporary filesystems and can be used in unit tests.  Here is some guidance with regards to usage of this class.

Watch your file type!

The following method will corrupt binary files.  Please do not use this method unless your source is a text file.

    void copyFile(String source, String target, FilterChain filterChain);
 

 

 

Copyright 2004-2024. All rights reserved unless otherwise noted.
Click here to read our privacy and cookie policy