@Deprecated @InterfaceAudience.Public @InterfaceStability.Stable public class Buffer extends Object implements Comparable, Cloneable
コンストラクタと説明 |
---|
Buffer()
非推奨です。
Create a zero-count sequence.
|
Buffer(byte[] bytes)
非推奨です。
Create a Buffer using the byte array as the initial value.
|
Buffer(byte[] bytes,
int offset,
int length)
非推奨です。
Create a Buffer using the byte range as the initial value.
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
append(byte[] bytes)
非推奨です。
Append specified bytes to the buffer
|
void |
append(byte[] bytes,
int offset,
int length)
非推奨です。
Append specified bytes to the buffer.
|
Object |
clone()
非推奨です。
|
int |
compareTo(Object other)
非推奨です。
Define the sort order of the Buffer.
|
void |
copy(byte[] bytes,
int offset,
int length)
非推奨です。
Copy the specified byte array to the Buffer.
|
boolean |
equals(Object other)
非推奨です。
|
byte[] |
get()
非推奨です。
Get the data from the Buffer.
|
int |
getCapacity()
非推奨です。
Get the capacity, which is the maximum count that could handled without
resizing the backing storage.
|
int |
getCount()
非推奨です。
Get the current count of the buffer.
|
int |
hashCode()
非推奨です。
|
void |
reset()
非推奨です。
Reset the buffer to 0 size
|
void |
set(byte[] bytes)
非推奨です。
Use the specified bytes array as underlying sequence.
|
void |
setCapacity(int newCapacity)
非推奨です。
Change the capacity of the backing storage.
|
String |
toString()
非推奨です。
|
String |
toString(String charsetName)
非推奨です。
Convert the byte buffer to a string an specific character encoding
|
void |
truncate()
非推奨です。
Change the capacity of the backing store to be the same as the current
count of buffer.
|
public Buffer()
public Buffer(byte[] bytes)
bytes
- This array becomes the backing storage for the object.public Buffer(byte[] bytes, int offset, int length)
bytes
- Copy of this array becomes the backing storage for the object.offset
- offset into byte arraylength
- length of datapublic void set(byte[] bytes)
bytes
- byte sequencepublic final void copy(byte[] bytes, int offset, int length)
bytes
- byte array to be assignedoffset
- offset into byte arraylength
- length of datapublic byte[] get()
public int getCount()
public int getCapacity()
public void setCapacity(int newCapacity)
newCapacity
- The new capacity in bytes.public void reset()
public void truncate()
public void append(byte[] bytes, int offset, int length)
bytes
- byte array to be appendedoffset
- offset into byte arraylength
- length of datapublic void append(byte[] bytes)
bytes
- byte array to be appendedpublic int compareTo(Object other)
compareTo
インタフェース内 Comparable
other
- The other bufferpublic String toString(String charsetName) throws UnsupportedEncodingException
charsetName
- Valid Java Character Set NameUnsupportedEncodingException
public Object clone() throws CloneNotSupportedException
clone
クラス内 Object
CloneNotSupportedException
Copyright © 2016 Apache Software Foundation. All rights reserved.