Module com.github.akurilov.commons
Class CircularArrayOutput<T>
- java.lang.Object
-
- com.github.akurilov.commons.io.collection.ArrayOutput<T>
-
- com.github.akurilov.commons.io.collection.CircularArrayOutput<T>
-
- All Implemented Interfaces:
Output<T>,java.io.Closeable,java.lang.AutoCloseable
public class CircularArrayOutput<T> extends ArrayOutput<T>
An array output which may use fixed space for unlimited (circular) storing.
-
-
Field Summary
-
Fields inherited from class com.github.akurilov.commons.io.collection.ArrayOutput
i, items
-
-
Constructor Summary
Constructors Constructor Description CircularArrayOutput(T[] items)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CircularArrayInput<T>getInput()Make aInputinstance from this.intput(java.util.List<T> buffer, int from, int to)Bulk circular put methodbooleanput(T item)Write the data itemjava.lang.StringtoString()-
Methods inherited from class com.github.akurilov.commons.io.collection.ArrayOutput
close, put
-
-
-
-
Constructor Detail
-
CircularArrayOutput
public CircularArrayOutput(T[] items)
-
-
Method Detail
-
put
public boolean put(T item) throws java.io.IOException
Description copied from interface:OutputWrite the data item
-
put
public int put(java.util.List<T> buffer, int from, int to) throws java.io.IOException
Bulk circular put method
-
getInput
public CircularArrayInput<T> getInput() throws java.io.IOException
Description copied from interface:OutputMake aInputinstance from this.
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classArrayOutput<T>
-
-