FileDocCategorySizeDatePackage
PipeImpl.javaAPI DocAndroid 1.5 API5681Wed May 06 22:41:04 BST 2009org.apache.harmony.nio.internal

PipeImpl

public final class PipeImpl extends Pipe

Fields Summary
private SinkChannelImpl
sink
private SourceChannelImpl
source
private int
serverPort
Constructors Summary
public PipeImpl()

        super();
        try {
            sink = new SinkChannelImpl(SelectorProvider.provider());
            source = new SourceChannelImpl(SelectorProvider.provider());
            sink.finishConnect();
            source.accept();
            source.closeServer();
        } catch(IOException ioe){
            reset();
            throw ioe;
        } catch(RuntimeException e){
            reset();
            throw e;
        }
    
Methods Summary
private voidreset()

        if(sink != null){
            try {
                sink.close();
            } catch (Exception e) {
            }
        }
        if(source != null){
            try {
                source.closeServer();
            } catch (Exception e) {
            }
            try {
                source.close();
            } catch (Exception e) {
            }
        }
    
public SinkChannelsink()

        return sink;
    
public SourceChannelsource()

        return source;