Package org.verapdf.as.filters
Class ASInFilter
java.lang.Object
java.io.InputStream
org.verapdf.as.io.ASInputStream
org.verapdf.as.filters.ASInFilter
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
ASBufferedInFilter
Base class for input filters.
- Author:
- Timur Kamalov
-
Field Summary
Fields inherited from class org.verapdf.as.io.ASInputStream
isClosed, isSourceClosed, resourceUsers -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedASInFilter(ASInFilter filter) protectedASInFilter(ASInputStream inputStream) Constructor from encoded stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidCloses stream resource.voidMethod decrements number of resource users.protected ASInputStreamvoidMethod increments number of resource users.intread()intread(byte[] buffer) intread(byte[] buffer, int size) voidreset()protected voidsetInputStream(ASInputStream inputStream) intskip(int size) Methods inherited from class org.verapdf.as.io.ASInputStream
createStreamFromStreamMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferTo
-
Constructor Details
-
ASInFilter
Constructor from encoded stream.- Parameters:
inputStream- is stream with initial encoded data.- Throws:
IOException
-
ASInFilter
-
-
Method Details
-
read
- Specified by:
readin classASInputStream- Throws:
IOException
-
read
- Specified by:
readin classASInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Specified by:
skipin classASInputStream- Throws:
IOException
-
closeResource
Description copied from class:ASInputStreamCloses stream resource. There is a difference between closing stream and closing it's resource. Several streams may have the same resource (e. g. the same file stream) and resource should be closed only after all streams using it are closed.- Specified by:
closeResourcein classASInputStream- Throws:
IOException
-
reset
- Specified by:
resetin classASInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classASInputStream- Throws:
IOException
-
getInputStream
-
setInputStream
-
incrementResourceUsers
public void incrementResourceUsers()Method increments number of resource users.- Specified by:
incrementResourceUsersin classASInputStream
-
decrementResourceUsers
public void decrementResourceUsers()Description copied from class:ASInputStreamMethod decrements number of resource users.- Specified by:
decrementResourceUsersin classASInputStream
-