Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2012 the project-owners Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package inti.util;
A simple pass-through output stream with reset method.
public abstract class AbstractOutputStream extends OutputStream {
The underlying stream.
    protected OutputStream stream;
byte-array for writing single bytes - not thread-safe.
    protected byte[] singleByte = new byte[1];
Sets the underlying stream.

    public void reset(OutputStream stream) {
        this. = stream;
Closes the underlying stream.
    public void close() throws IOException {
Flushes the underlying stream.
    public void flush() throws IOException {
Uses the singleByte-array and pass it to the[],int,int) method.
    public void write(int bthrows IOException {
        [0] = (byteb;
        write(, 0, .);
New to GrepCode? Check out our FAQ X