Class ByteArray
- java.lang.Object
-
- com.moilioncircle.redis.replicator.util.ByteArray
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classByteArray.Iter
-
Field Summary
Fields Modifier and Type Field Description protected static intBITSprotected intcapprotected byte[][]largeBytesprotected longlengthprotected static intMAGICprotected static intMASKstatic longMAX_VALUEstatic longMIN_VALUEprotected byte[]smallBytes
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidarraycopy(ByteArray src, long srcPos, ByteArray dest, long destPos, long length)byte[]first()byteget(long idx)Iterator<byte[]>iterator()longlength()voidset(long idx, byte value)voidwriteTo(OutputStream out, long off, long length)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
BITS
protected static final int BITS
- See Also:
- Constant Field Values
-
MAGIC
protected static final int MAGIC
- See Also:
- Constant Field Values
-
MASK
protected static final int MASK
- See Also:
- Constant Field Values
-
MIN_VALUE
public static final long MIN_VALUE
- See Also:
- Constant Field Values
-
MAX_VALUE
public static final long MAX_VALUE
- See Also:
- Constant Field Values
-
cap
protected final int cap
-
length
protected final long length
-
smallBytes
protected byte[] smallBytes
-
largeBytes
protected byte[][] largeBytes
-
-
Method Detail
-
set
public void set(long idx, byte value)
-
get
public byte get(long idx)
-
length
public long length()
-
first
public byte[] first()
-
writeTo
public void writeTo(OutputStream out, long off, long length) throws IOException
- Throws:
IOException
-
-