SessionOutputBufferImpl@NotThreadSafe @Deprecated public abstract class AbstractSessionOutputBuffer extends java.lang.Object implements SessionOutputBuffer, BufferInfo
OutputStream. This class buffers small chunks of
output data in an internal byte array for optimal output performance.
writeLine(CharArrayBuffer) and writeLine(String) methods
of this class use CR-LF as a line delimiter.| 限定符 | 构造器和说明 |
|---|---|
|
AbstractSessionOutputBuffer()
已过时。
|
protected |
AbstractSessionOutputBuffer(java.io.OutputStream outstream,
int buffersize,
java.nio.charset.Charset charset,
int minChunkLimit,
java.nio.charset.CodingErrorAction malformedCharAction,
java.nio.charset.CodingErrorAction unmappableCharAction)
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
available()
已过时。
Returns available space in the buffer.
|
int |
capacity()
已过时。
Returns total capacity of the buffer
|
protected HttpTransportMetricsImpl |
createTransportMetrics()
已过时。
|
void |
flush()
已过时。
Flushes this session buffer and forces any buffered output bytes
to be written out.
|
protected void |
flushBuffer()
已过时。
|
HttpTransportMetrics |
getMetrics()
已过时。
Returns
HttpTransportMetrics for this session buffer. |
protected void |
init(java.io.OutputStream outstream,
int buffersize,
HttpParams params)
已过时。
|
int |
length()
已过时。
Return length data stored in the buffer
|
void |
write(byte[] b)
已过时。
Writes
b.length bytes from the specified byte array
to this session buffer. |
void |
write(byte[] b,
int off,
int len)
已过时。
Writes
len bytes from the specified byte array
starting at offset off to this session buffer. |
void |
write(int b)
已过时。
Writes the specified byte to this session buffer.
|
void |
writeLine(CharArrayBuffer charbuffer)
已过时。
Writes characters from the specified char array followed by a line
delimiter to this session buffer.
|
void |
writeLine(java.lang.String s)
已过时。
Writes characters from the specified string followed by a line delimiter
to this session buffer.
|
protected AbstractSessionOutputBuffer(java.io.OutputStream outstream,
int buffersize,
java.nio.charset.Charset charset,
int minChunkLimit,
java.nio.charset.CodingErrorAction malformedCharAction,
java.nio.charset.CodingErrorAction unmappableCharAction)
public AbstractSessionOutputBuffer()
protected void init(java.io.OutputStream outstream,
int buffersize,
HttpParams params)
protected HttpTransportMetricsImpl createTransportMetrics()
public int capacity()
BufferInfocapacity 在接口中 BufferInfopublic int length()
BufferInfolength 在接口中 BufferInfopublic int available()
BufferInfoavailable 在接口中 BufferInfoprotected void flushBuffer()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
SessionOutputBufferflush is
that calling it is an indication that, if any bytes previously
written have been buffered by the implementation of the output
stream, such bytes should immediately be written to their
intended destination.flush 在接口中 SessionOutputBufferjava.io.IOException - if an I/O error occurs.public void write(byte[] b,
int off,
int len)
throws java.io.IOException
SessionOutputBufferlen bytes from the specified byte array
starting at offset off to this session buffer.
If off is negative, or len is negative, or
off+len is greater than the length of the array
b, then an IndexOutOfBoundsException is thrown.
write 在接口中 SessionOutputBufferb - the data.off - the start offset in the data.len - the number of bytes to write.java.io.IOException - if an I/O error occurs.public void write(byte[] b)
throws java.io.IOException
SessionOutputBufferb.length bytes from the specified byte array
to this session buffer.write 在接口中 SessionOutputBufferb - the data.java.io.IOException - if an I/O error occurs.public void write(int b)
throws java.io.IOException
SessionOutputBufferwrite 在接口中 SessionOutputBufferb - the byte.java.io.IOException - if an I/O error occurs.public void writeLine(java.lang.String s)
throws java.io.IOException
This method uses CR-LF as a line delimiter.
writeLine 在接口中 SessionOutputBuffers - the line.java.io.IOException - if an I/O error occurs.public void writeLine(CharArrayBuffer charbuffer) throws java.io.IOException
This method uses CR-LF as a line delimiter.
writeLine 在接口中 SessionOutputBuffercharbuffer - the buffer containing chars of the line.java.io.IOException - if an I/O error occurs.public HttpTransportMetrics getMetrics()
SessionOutputBufferHttpTransportMetrics for this session buffer.getMetrics 在接口中 SessionOutputBuffer