Interface ContentOutputBuffer
-
- All Known Implementing Classes:
SharedOutputBuffer
public interface ContentOutputBufferGeneric content output buffer.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intlength()Return length data stored in the buffervoidreset()Resets the buffer by clearing its state and stored content.voidwrite(byte[] b, int off, int len)Writeslenbytes from the specified byte array starting at offsetoffto this buffer.voidwrite(int b)Writes the specified byte to this buffer.voidwriteCompleted()Indicates the content has been fully written.
-
-
-
Method Detail
-
length
int length()
Return length data stored in the buffer- Returns:
- data length
-
reset
void reset()
Resets the buffer by clearing its state and stored content.
-
write
void write(byte[] b, int off, int len) throws java.io.IOExceptionWriteslenbytes from the specified byte array starting at offsetoffto this buffer.If
offis negative, orlenis negative, oroff+lenis greater than the length of the arrayb, this method can throw a runtime exception. The exact type of runtime exception thrown by this method depends on implementation.- Parameters:
b- the data.off- the start offset in the data.len- the number of bytes to write.- Throws:
java.io.IOException- if an I/O error occurs.
-
write
void write(int b) throws java.io.IOExceptionWrites the specified byte to this buffer.- Parameters:
b- thebyte.- Throws:
java.io.IOException- if an I/O error occurs.
-
writeCompleted
void writeCompleted() throws java.io.IOExceptionIndicates the content has been fully written.- Throws:
java.io.IOException- if an I/O error occurs.
-
-