Package net.jolivier.s3api.http.filter
Class RangedOutputStream.Range
- java.lang.Object
-
- java.io.OutputStream
-
- net.jolivier.s3api.http.filter.RangedOutputStream.Range
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- RangedOutputStream
public class RangedOutputStream.Range extends java.io.OutputStreamA rangedOutputStream.
-
-
Constructor Summary
Constructors Constructor Description Range(long from, long to)Instantiates a new range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(long index)Contains.byte[]getBytes()Returns the bytes of this range.longgetFrom()Returns the starting index of this range.java.lang.LonggetTo(long ifZero)Returns the ending index of this range.voidwrite(int b)
-
-
-
Method Detail
-
contains
public boolean contains(long index)
Contains.- Parameters:
index- the index to check- Returns:
- true, if the index is in this range
-
getBytes
public byte[] getBytes()
Returns the bytes of this range.- Returns:
- the bytes of this range
-
getFrom
public long getFrom()
Returns the starting index of this range.- Returns:
- the starting index of this range
-
getTo
public java.lang.Long getTo(long ifZero)
Returns the ending index of this range.- Parameters:
ifZero- the index to return if the range end is not bound- Returns:
- the ending index of this range
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
-