Module jp.cafebabe.kunai
The module jp.cafebabe.kunai
handles the reading and writing the class files.
The reading supports from local files, directories, jar/war files as the DataSource
.
The writing supports to local files, directories, jar files by representing DataSink
.
The below program is an example program for copying reading source to the destination (it assumes local files).
public void copy(String from, String to) throws Exception { try(DataSource
source = newDefaultDataSourceFactory
().build(Paths.get(from));DataSink
sink = newDefaultDataSinkFactory
().create(Paths.get(to))){ copy(source, sink); } } public void copy(DataSource
source,DataSink
sink) throws Exception { sink.consume(source); }
- Author:
- Haruaki Tamada
-
-
Packages
Exports Package Description jp.cafebabe.kunai.entries This package includes classes for entry of the data sourcejp.cafebabe.kunai.sink This package includes classes for sinking the entries into some destination;jp.cafebabe.kunai.source The package includes data source classes.jp.cafebabe.kunai.source.factories This package includes classes related with data source factories.
-