|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
javax.mail.util Class SharedByteArrayInputStream
java.lang.Objectjava.io.InputStream
java.io.ByteArrayInputStream
javax.mail.util.SharedByteArrayInputStream
- 所有已实现的接口:
- Closeable, SharedInputStream
public class SharedByteArrayInputStream
- extends ByteArrayInputStream
- implements SharedInputStream
A ByteArrayInputStream that implements the SharedInputStream interface, allowing the underlying byte array to be shared between multiple readers.
- 从以下版本开始:
- JavaMail 1.4
- 版本:
- 1.5, 07/05/04
- 作者:
- Bill Shannon
| 字段摘要 | |
|---|---|
protected int |
start
Position within shared buffer that this stream starts at. |
| Fields inherited from class java.io.ByteArrayInputStream |
|---|
buf, count, mark, pos |
| 构造器摘要 | |
|---|---|
SharedByteArrayInputStream(byte[] buf)
Create a SharedByteArrayInputStream representing the entire byte array. |
|
SharedByteArrayInputStream(byte[] buf,
int offset,
int length)
Create a SharedByteArrayInputStream representing the part of the byte array from offset for length
bytes. |
|
| 方法摘要 | |
|---|---|
long |
getPosition()
Return the current position in the InputStream, as an offset from the beginning of the InputStream. |
InputStream |
newStream(long start,
long end)
Return a new InputStream representing a subset of the data from this InputStream, starting at start (inclusive)
up to end (exclusive). |
| 类方法继承 java.io.ByteArrayInputStream |
|---|
available, close, mark, markSupported, read, read, reset, skip |
| 类方法继承 java.io.InputStream |
|---|
read |
| 类方法继承 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
start
protected int start
- Position within shared buffer that this stream starts at.
| 构造器详细信息 |
|---|
SharedByteArrayInputStream
public SharedByteArrayInputStream(byte[] buf)
- Create a SharedByteArrayInputStream representing the entire
byte array.
- 参数:
buf- the byte array
SharedByteArrayInputStream
public SharedByteArrayInputStream(byte[] buf,
int offset,
int length)
- Create a SharedByteArrayInputStream representing the part
of the byte array from
offsetforlengthbytes.- 参数:
buf- the byte arrayoffset- offset in byte array to first byte to includelength- number of bytes to include
| 方法详细信息 |
|---|
getPosition
public long getPosition()
- Return the current position in the InputStream, as an
offset from the beginning of the InputStream.
- 规范说明:
getPositionin interfaceSharedInputStream
- 返回:
- the current position
newStream
public InputStream newStream(long start, long end)
- Return a new InputStream representing a subset of the data
from this InputStream, starting at
start(inclusive) up toend(exclusive).startmust be non-negative. Ifendis -1, the new stream ends at the same place as this stream. The returned InputStream will also implement the SharedInputStream interface. - 规范说明:
newStreamin interfaceSharedInputStream
- 参数:
start- the starting positionend- the ending position + 1- 返回:
- the new stream
|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.
