package org.jboss.resteasy.util;
import java.io.IOException;
import java.io.OutputStream;
public class extends OutputStream
{
protected OutputStream ;
protected boolean ;
protected CommitCallback ;
public (final OutputStream delegate, final CommitCallback headers)
{
this.delegate = delegate;
this.headers = headers;
}
public ()
{
}
public OutputStream ()
{
return delegate;
}
public void (OutputStream delegate)
{
this.delegate = delegate;
}
public void (CommitCallback headers)
{
this.headers = headers;
}
public interface
{
void ();
}
public synchronized void ()
{
if (isHeadersCommitted) return;
isHeadersCommitted = true;
headers.commit();
}
@Override
public void (int i) throws IOException
{
commit();
delegate.write(i);
}
@Override
public void (byte[] bytes) throws IOException
{
commit();
delegate.write(bytes);
}
@Override
public void (byte[] bytes, int i, int i1) throws IOException
{
commit();
delegate.write(bytes, i, i1);
}
@Override
public void () throws IOException
{
commit();
delegate.flush();
}
@Override
public void () throws IOException
{
commit();
delegate.close();
}
}