applesingle/api
2018-05-26 16:58:59 -05:00
..
src Split into a muti-project Gradle build in order to separate the API/lib from the command-line 'asu' tool. 2018-05-26 16:58:59 -05:00
build.gradle Split into a muti-project Gradle build in order to separate the API/lib from the command-line 'asu' tool. 2018-05-26 16:58:59 -05:00
README.md Split into a muti-project Gradle build in order to separate the API/lib from the command-line 'asu' tool. 2018-05-26 16:58:59 -05:00

Java API Examples

Usage is catered to the factory methods and builder. Some sample are included below.

Read AppleSingle

Use the factory method to...

Reading from standard input:

AppleSingle as = AppleSingle.read(System.in);

Reading from a file:

File file = new File("myfile.as");
AppleSingle as = AppleSingle.read(file);

The AppleSingle file can be read from an InputStream, File, Path, or just a byte array.

Create AppleSingle

Use the builder to create a new AppleSingle file and then save it...

AppleSingle as = AppleSingle.builder()
        .dataFork(dataFork)
        .realName(realName)
        .build();
        
Path file = Paths.get("mynewfile.as"); 
as.save(file);

The save(...) method can save to a File, Path, or an OutputStream.