| Modifier and Type | Field and Description |
|---|---|
| public int | begin
Deprecated
|
| public byte[] | bytes
Deprecated
|
| private static final ConcurrentMap | |
| private static final int | |
| public static final ByteList | |
| private Encoding | |
| pack-priv transient int | |
| private static final Charset | |
| public static final byte[] | |
| public int | realSize
Deprecated
|
| private static final long | |
| pack-priv transient String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ByteList(int
to preallocate the bytelist to size)Creates a new instance of Bytelist with a pre-allocated size. |
| public | |
| public | |
| public | ByteList(byte[]
the initial bytes for this ByteList wrap)Create a new instance of ByteList with the contents of wrap. |
| public | ByteList(byte[]
the initial bytes for this ByteList wrap, boolean whether to arraycopy wrap for the backing store or not copy)Create a new instance of ByteList with the contents of wrap. |
| public | |
| public | |
| public | ByteList(byte[]
the bytes to use wrap, int where in the bytes the data starts index, int how long the data is in the wrap array len)Create a new instance of ByteList using wrap as a backing store where index is the first index in the byte array where the data starts and len indicates how long the data portion of the bytelist is. |
| public | ByteList(byte[]
the bytes to use wrap, int where in the bytes the data starts index, int how long the data is in the wrap array len, boolean if true array copy wrap. otherwise use as backing store copy)Create a new instance of ByteList using wrap as a backing store where index is the first index in the byte array where the data starts and len indicates how long the data portion of the bytelist is. |
| public | ByteList(byte[]
the bytes to use wrap, int where in the bytes the data starts index, int how long the data is in the wrap array len, Encoding encoding, boolean if true array copy wrap. otherwise use as backing store copy)Create a new instance of ByteList using wrap as a backing store where index is the first index in the byte array where the data starts and len indicates how long the data portion of the bytelist is. |
| public | ByteList(ByteList
the bytes to use wrap, int where in the bytes the data starts index, int how long the data is in the wrap array len)Create a new instance of ByteList using wrap as a backing store where index is the first index in the byte array where the data starts and len indicates how long the data portion of the bytelist is. |
| Modifier and Type | Method and Description |
|---|---|
| public ByteList | |
| public ByteList | Returns: this instancethe int to truncated and added b)Append a single byte to the ByteList by truncating the given int |
| public ByteList | Returns: this instancethe stream to read bytes from input, int how many bytes to try reading len)Append up to length bytes from InputStream to the ByteList. |
| public void | append(ByteBuffer
to be appended buffer, int is number of bytes you hoping to get from the ByteBuffer len)Append contents of the supplied nio ByteList up to len length onto the end of this ByteBuffer. |
| public void | |
| public void | |
| public void | |
| public void | append(byte[]
to be added. moreBytes, int is the new begin value start, int is the number of bytes to append from source byte array len)Append moreBytes onto the end of the current ByteList with start as the new begin for len bytes from the moreBytes byte array. |
| public int | |
| public byte[] | |
| public int | Returns: -1, 0, or 1the ByteList to compare other)Do a case insensitive comparison with other ByteList with return types similiar to compareTo. |
| public char | charAt(int
is the index you want ix)Implements java. Pretend byte array is raw and each byte is also the character value |
| public Object | |
| public int | |
| public int | compareTo(Object
the object to be compared. other)Implements java. This comparison matches MRI comparison of Strings (rb_str_cmp). |
| public static ByteList | Returns: the new ByteListthe source for new ByteList s)Create a bytelist with ISO_8859_1 encoding from the provided CharSequence. |
| public static String | |
| private static String | |
| public static String | |
| public void | delete(int
index to delete from start, int number of bytes to delete len)Delete len bytes from start index. |
| public ByteList | dup()
creates a duplicate of this bytelist but only in the case of a stringValue and its resulting hash value. |
| public ByteList | dup(int
is the value of how big the buffer is going to be, not the actual length to copy
It is used by RubyString.modify(int) to prevent COW pathological situations
(namely to COW with having length)length - realSize bytes ahead)
|
| public static byte[] | Returns: the new byte[]to be encoded data, String used to extract the resulting bytes charsetName)Encode CharSequence into a set of bytes based on the charsetName. |
| public boolean | |
| public void | ensure(int
to use to make sure ByteList is long enough length)Ensure that the bytelist is at least length bytes long. |
| public boolean | |
| public boolean | Returns: true is this ByteList is the sameis the bytelist to compare with other)Overrides java. Does this ByteList equal the other ByteList? |
| public void | fill(final int
is byte to be appended b, final int is number of times to repeat the append len)Append the byte b up to len times onto the end of the current ByteList. |
| public int | Returns: the byte retreivedto retreive byte from index)Get the byte at index from the ByteList. |
| public int | |
| public int | Returns: the element you requestedis the element you want index)Get the index code point in this ByteList. |
| public Encoding | |
| public int | |
| public byte[] | |
| private void | |
| public int | |
| public int | Returns: the index of the byte or -1 if not foundbyte to be looking for c)Get the index of first occurrence of c in ByteList from the beginning of the ByteList. |
| public int | Returns: the index of the byte or -1 if not foundbyte to be looking for c, int off set from beginning of ByteList to look for byte pos)Get the index of first occurrence of c in ByteList from the pos offset of the ByteList. |
| public int | |
| public int | |
| pack-priv static int | Returns: the index of the byte or -1 if not foundGet the index of first occurrence of target in source using the offset and count parameters. |
| public void | |
| public void | |
| public boolean | Returns: true if empty, false otherwiseOverrides default java. Return true if the ByteList has zero length (byte length). |
| public int | Returns: the index of the byte or -1 if not foundbyte to be looking for c)Get the index of last occurrence of c in ByteList from the end of the ByteList. |
| public int | Returns: the index of the byte or -1 if not foundbyte to be looking for c, int off set from end of ByteList to look for byte pos)Get the index of last occurrence of c in ByteList from the pos offset of the ByteList. |
| public int | Returns: the index of the byte or -1 if not foundByteList to be looking for find)Get the index of last occurrence of find in ByteList from the end of the ByteList. |
| public int | Returns: the index of the byte or -1 if not foundByteList to be looking for find, int index from end of list to search from pos)Get the index of last occurrence of find in ByteList from the end of the ByteList. |
| pack-priv static int | Returns: the index of the byte or -1 if not foundGet the index of last occurrence of target in source using the offset and count parameters. |
| public int | Returns: the number of bytes in this ByteList.Implements java. Return the current length of the ByteList. |
| public void | |
| public int | Returns: number of charactersNumber of characters in this ByteList based on its current encoding. |
| private static Charset | |
| public ByteList | makeShared(int
new begin value for shared ByteBuffer index, int new length/realSize for chared len)Make a shared copy of this ByteList. |
| public static int | Returns: -1, 0, 1Are these two byte arrays similiar (semantics similiar to compareTo). |
| public static int | Returns: -1, 0, 1Are these two byte arrays similiar (semantics similiar to compareTo). |
| public static byte[] | Returns: a byte[]the CharSequence to convert s)Create a byte[] from a CharSequence assuming a raw/ISO-8859-1 encoding |
| public static byte[] | Returns: a byte[]the CharSequence to convert s)Create a byte[] from a char[] assuming a raw/ISO-8859-1 encoding |
| public static char[] | Returns: a byte[]the source byte[] b, int index to start converting to char's start, int how many bytes to convert to char's length)Create a char[] from a byte[] assuming a raw/ISO-8859-1 encoding |
| public static char[] | Returns: a byte[]the source byte[] b)Create a char[] from a byte[] assuming a raw/ISO-8859-1 encoding |
| public void | |
| public void | realloc(int
the new length for the backing store. length)Resize the ByteList's backing store to be length in size. |
| public int | |
| public void | |
| public void | replace(byte[]
bytes to use for replacement source)Replace all bytes in this ByteList with bytes from the given array. |
| public void | |
| public void | replace(int
offset of target region in this ByteList targetOff, int length of target region in this ByteList targetLen, byte[] bytes to use for replacement source)Replace a region of bytes in this ByteList with bytes from the given array. |
| public void | replace(int
offset of target region in this ByteList targetOff, int length of target region in this ByteList targetLen, byte[] bytes to use for replacement source, int offset of source region in the replacement bytes sourceOff, int length of source region in the replacement bytes sourceLen)Replace a region of bytes in this ByteList with a region of bytes from the given array. |
| public static Encoding | |
| public boolean | sample_equals(Object other)
an alternative to the new version of equals, should detect inequality faster (in many cases), but is slow in the case of equal values (all bytes visited), due to using n+=2, n-=2 vs. ++n, --n while iterating over the array. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public ByteList | Returns: a new ByteList with same backing storeCreate a new ByteList but do not array copy the byte backing store. |
| public boolean | |
| public boolean | Returns: true is this ByteList starts with otheris the bytelist to compare with other)Does this ByteList start with the supplied ByteList? |
| public CharSequence | Returns: a new ByteList/CharSequenceindex for beginning of subsequence start, int index for end of subsequence end)Implements java. Create subSequence of this array between start and end offsets |
| public String | Returns: a String based on the raw bytesProduce a String using the raw (ISO-8859-1) bytes of this ByteList. |
| public String | Returns: an ISO-8859-1 representation of the byte listOverrides java. Implements java. Remembers toString value, which is expensive for StringBuffer. |
| public byte[] | |
| public void | |
| public void | |
| public void | unsafeReplace(int beg, int len, byte[] nbytes, int index, int count)
Unsafe version of replace(int,int,byte[],int,int). |
| public void | unshare()
Array copy the byte backing store so that you can guarantee that no other objects are referencing this objects backing store. |
| public void | unshare(int
is the value of how big the buffer is going to be, not the actual length to copy
It is used by RubyString.modify(int) to prevent COW pathological situations
(namely to COW with having length)length - realSize bytes ahead)Array copy the byte backing store so that you can guarantee that no other objects are referencing this objects backing store. |
| public void | view(int
new value to add to begin index, int the new realSize/length value len)Change ByteBuffer to have a new begin that is +index positions past begin with a new length. |