Package java.nio.channels

Examples of java.nio.channels.UnsupportedAddressTypeException


    /**
     * @tests serialization/deserialization compatibility.
     */
    public void testSerializationSelf() throws Exception {

        SerializationTest.verifySelf(new UnsupportedAddressTypeException());
    }
View Full Code Here


     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {

        SerializationTest.verifyGolden(this,
                new UnsupportedAddressTypeException());
    }
View Full Code Here

    static InetSocketAddress validateAddress(SocketAddress socketAddress) {
        if (null == socketAddress) {
            throw new IllegalArgumentException();
        }
        if (!(socketAddress instanceof InetSocketAddress)) {
            throw new UnsupportedAddressTypeException();
        }
        InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
        if (inetSocketAddress.isUnresolved()) {
            throw new UnresolvedAddressException();
        }
View Full Code Here

    InetAddress localhost = InetAddress.getLocalHost();
    if (localhost instanceof Inet4Address) {
      return (Inet4Address)localhost;
    }

    throw new UnsupportedAddressTypeException();
  }
View Full Code Here

     * The UDP announce request protocol only supports IPv4
     *
     * @see http://bittorrent.org/beps/bep_0015.html#ipv6
     */
    if (! (InetAddress.getByName(peer.getIp()) instanceof Inet4Address)) {
      throw new UnsupportedAddressTypeException();
    }

    this.address = new InetSocketAddress(
      tracker.getHost(),
      tracker.getPort());
View Full Code Here

    @Override
    public List<List<String>> lookupProcessingElementConverter(
            String outputDType,
            String inputDType)
    {
        throw new UnsupportedAddressTypeException();
    }
View Full Code Here

    @Override
    public AsynchronousDatagramChannel bind(SocketAddress local)
        throws IOException
    {
        if ((local != null) && (!(local instanceof InetSocketAddress))) {
            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetLocal = (InetSocketAddress) local;
        if ((inetLocal != null) && inetLocal.isUnresolved()) {
            throw new UnresolvedAddressException();
View Full Code Here

        if (interf == null) {
            throw new NullPointerException("null interface");
        }

        if (!group.isMulticastAddress()) {
            throw new UnsupportedAddressTypeException();
        }

        if (protocolFamily == StandardProtocolFamily.INET) {
            if (!((group instanceof Inet4Address) ||
                   ((group instanceof Inet6Address) &&
                       ((Inet6Address) group).isIPv4CompatibleAddress()))) {
                throw new UnsupportedAddressTypeException();
            }
        } else if (protocolFamily == StandardProtocolFamily.INET6) {
            if (!(group instanceof Inet6Address)) {
                throw new UnsupportedAddressTypeException();
            }
        }

        InetSocketAddress mcastaddr = new InetSocketAddress(group, 0);
        MembershipKeyImpl newKey = new MembershipKeyImpl(mcastaddr, interf);
View Full Code Here

            final SocketAddress remote,
            final A attachment,
            final CompletionHandler<Void, ? super A> handler)
    {
        if ((remote != null) && (!(remote instanceof InetSocketAddress))) {
            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetRemote = (InetSocketAddress) remote;
        if ((inetRemote != null) && inetRemote.isUnresolved()) {
            throw new UnresolvedAddressException();
View Full Code Here

    public AsyncServerSocketChannelImpl bind(SocketAddress local,
                                             int backlog)
        throws IOException
    {
        if ((local != null) && (!(local instanceof InetSocketAddress))) {
            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetLocal = (InetSocketAddress) local;
        if ((inetLocal != null) && inetLocal.isUnresolved()) {
            throw new UnresolvedAddressException();
View Full Code Here

TOP

Related Classes of java.nio.channels.UnsupportedAddressTypeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.