Package com.github.jinahya.bit.io
Class AbstractByteInput<T>
- java.lang.Object
-
- com.github.jinahya.bit.io.AbstractByteInput<T>
-
- Type Parameters:
T
- byte source type parameter
- All Implemented Interfaces:
ByteInput
- Direct Known Subclasses:
ArrayByteInput
,BufferByteInput
,DataByteInput
,StreamByteInput
public abstract class AbstractByteInput<T> extends Object implements ByteInput
An abstract class for implementingByteInput
.- Author:
- Jin Kwon <jinahya_at_gmail.com>
- See Also:
AbstractBitOutput
-
-
Constructor Summary
Constructors Constructor Description AbstractByteInput(T source)
Creates a new instance built on top of specified byte source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getSource()
Returns the current value ofsource
.void
setSource(T source)
Replaces the current value ofsource
with given.String
toString()
Returns a string representation of the object.
-
-
-
Field Detail
-
source
protected T source
The underlying byte source.
-
-
Constructor Detail
-
AbstractByteInput
public AbstractByteInput(T source)
Creates a new instance built on top of specified byte source.- Parameters:
source
- the underlying byte source ornull
if it is intended to be lazily initialized and set.
-
-