Lines Matching defs:channel

90      * Constructor for creating a connected socket channel.
97 * Constructor for creating an optionally connected socket channel.
475 private final SocketChannelImpl channel;
478 SocketAdapter(PlainSocketImpl socketImpl, SocketChannelImpl channel) throws SocketException {
481 this.channel = channel;
491 return channel;
496 return channel.isBound;
501 return channel.isConnected();
507 return channel.getLocalAddress();
515 if (!channel.isBlocking()) {
522 channel.initLocalAddressAndPort();
524 channel.setConnected();
525 channel.isBound = super.isBound();
531 if (channel.isConnected()) {
534 if (SocketChannelImpl.SOCKET_STATUS_PENDING == channel.status) {
538 channel.initLocalAddressAndPort();
539 channel.isBound = true;
544 synchronized (channel) {
545 if (channel.isOpen()) {
546 channel.close();
550 channel.status = SocketChannelImpl.SOCKET_STATUS_CLOSED;
560 return new SocketChannelOutputStream(channel);
569 return new SocketChannelInputStream(channel);
573 if (!channel.isOpen()) {
576 if (!channel.isConnected()) {
588 * This output stream delegates all operations to the associated channel.
589 * Throws an IllegalBlockingModeException if the channel is in non-blocking
593 private final SocketChannel channel;
595 public SocketChannelOutputStream(SocketChannel channel) {
596 this.channel = channel;
600 * Closes this stream and channel.
606 channel.close();
613 if (!channel.isBlocking()) {
616 channel.write(buf);
621 if (!channel.isBlocking()) {
626 channel.write(buffer);
631 * This input stream delegates all operations to the associated channel.
632 * Throws an IllegalBlockingModeException if the channel is in non-blocking
636 private final SocketChannel channel;
638 public SocketChannelInputStream(SocketChannel channel) {
639 this.channel = channel;
643 * Closes this stream and channel.
647 channel.close();
652 if (!channel.isBlocking()) {
656 int result = channel.read(buf);
663 if (!channel.isBlocking()) {
667 return channel.read(buf);