-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractDataSink
,ClassFileDataSink
,DirectoryDataSink
,JarFileDataSink
,WarFileDataSink
public interface DataSink extends AutoCloseable
This abstract class is the super class for sinking entries.- Author:
- Haruaki TAMADA
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
close()
closes this instance.default void
consume(byte[] data, Entry entry)
write given data to this instance.void
consume(InputStream in, Entry entry)
write given data from stream to this instance.default void
consume(Entry entry)
write data from the given entry to this instance.default void
consume(DataSource source)
write given data entries to this instance.
-
-
-
Method Detail
-
consume
default void consume(byte[] data, Entry entry) throws KunaiException
write given data to this instance.- Parameters:
data
- writing dataentry
- meta data of data- Throws:
KunaiException
- I/O error
-
consume
default void consume(Entry entry) throws KunaiException
write data from the given entry to this instance.- Parameters:
entry
- writing data and its meta data- Throws:
KunaiException
- I/O error
-
consume
void consume(InputStream in, Entry entry) throws KunaiException
write given data from stream to this instance.- Parameters:
in
- writing dataentry
- meta data of data- Throws:
KunaiException
- I/O error
-
consume
default void consume(DataSource source)
write given data entries to this instance.- Parameters:
source
- writing data
-
close
void close() throws IOException
closes this instance. After the calling this method, writing data of this instance causes the I/O error.- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
- I/O error
-
-