org.openrdf.http.object.util
Class PipeErrorSource

java.lang.Object
  extended by org.openrdf.http.object.util.PipeErrorSource
All Implemented Interfaces:
Closeable, Channel, ReadableByteChannel

public class PipeErrorSource
extends Object
implements ReadableByteChannel

Pipes bytes and IOExceptions through a ReadableByteChannel.

Author:
James Leigh

Constructor Summary
PipeErrorSource(Pipe pipe)
           
PipeErrorSource(Pipe pipe, Closeable closeable)
           
 
Method Summary
 void close()
           
 void error(IOException e)
           
 boolean isOpen()
           
 int read(ByteBuffer dst)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PipeErrorSource

public PipeErrorSource(Pipe pipe)
                throws IOException
Throws:
IOException

PipeErrorSource

public PipeErrorSource(Pipe pipe,
                       Closeable closeable)
                throws IOException
Throws:
IOException
Method Detail

error

public void error(IOException e)

isOpen

public boolean isOpen()
Specified by:
isOpen in interface Channel

read

public int read(ByteBuffer dst)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface Channel
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.