sun.nio.ch.IOUtil Java Examples

The following examples show how to use sun.nio.ch.IOUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SctpChannelImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #2
Source File: SctpChannelImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #3
Source File: SctpChannelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #4
Source File: SctpChannelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #5
Source File: SctpChannelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #6
Source File: SctpChannelImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #7
Source File: SctpChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #8
Source File: SctpChannelImpl.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #9
Source File: SctpChannelImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #10
Source File: SctpChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Constructor for sockets obtained from branching
 */
public SctpChannelImpl(SelectorProvider provider,
                       FileDescriptor fd,
                       Association association)
        throws IOException {
    super(provider);
    this.fd = fd;
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.CONNECTED;
    port = (Net.localAddress(fd)).getPort();

    if (association != null) { /* branched */
        this.association = association;
    } else { /* obtained from server channel */
        /* Receive COMM_UP */
        ByteBuffer buf = Util.getTemporaryDirectBuffer(50);
        try {
            receive(buf, null, null, true);
        } finally {
            Util.releaseTemporaryDirectBuffer(buf);
        }
    }
}
 
Example #11
Source File: SctpServerChannelImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initializes a new instance of this class.
 */
public SctpServerChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.INUSE;
}
 
Example #12
Source File: SctpMultiChannelImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #13
Source File: SctpServerChannelImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initializes a new instance of this class.
 */
public SctpServerChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.INUSE;
}
 
Example #14
Source File: SctpMultiChannelImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #15
Source File: SctpMultiChannelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #16
Source File: SctpMultiChannelImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #17
Source File: SctpServerChannelImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initializes a new instance of this class.
 */
public SctpServerChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.INUSE;
}
 
Example #18
Source File: SctpMultiChannelImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #19
Source File: SctpChannelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}
 
Example #20
Source File: SctpChannelImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}
 
Example #21
Source File: SctpMultiChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #22
Source File: SctpChannelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}
 
Example #23
Source File: SctpServerChannelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initializes a new instance of this class.
 */
public SctpServerChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.INUSE;
}
 
Example #24
Source File: SctpChannelImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}
 
Example #25
Source File: SctpChannelImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}
 
Example #26
Source File: SctpServerChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initializes a new instance of this class.
 */
public SctpServerChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.INUSE;
}
 
Example #27
Source File: SctpChannelImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}
 
Example #28
Source File: SctpMultiChannelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public SctpMultiChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider, remove public modifier
    super(provider);
    this.fd = SctpNet.socket(false /*one-to-many*/);
    this.fdVal = IOUtil.fdVal(fd);
}
 
Example #29
Source File: SctpServerChannelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Initializes a new instance of this class.
 */
public SctpServerChannelImpl(SelectorProvider provider)
        throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.INUSE;
}
 
Example #30
Source File: SctpChannelImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Constructor for normal connecting sockets
 */
public SctpChannelImpl(SelectorProvider provider) throws IOException {
    //TODO: update provider remove public modifier
    super(provider);
    this.fd = SctpNet.socket(true);
    this.fdVal = IOUtil.fdVal(fd);
    this.state = ChannelState.UNCONNECTED;
}