< prev index next >

test/java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java

Print this page




  25 import java.io.ByteArrayOutputStream;
  26 import java.io.FileNotFoundException;
  27 import java.io.FileOutputStream;
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.io.ObjectOutputStream;
  31 import java.io.PrintStream;
  32 import java.net.Inet6Address;
  33 import java.net.InetAddress;
  34 import java.net.NetworkInterface;
  35 import java.net.UnknownHostException;
  36 import java.util.ArrayList;
  37 import java.util.Arrays;
  38 import java.util.Enumeration;
  39 import java.util.List;
  40 
  41 /**
  42  * @test
  43  * @bug 8007373
  44  * @summary jdk7 backward compatibility serialization problem

  45  */
  46 
  47 public class Inet6AddressSerializationTest {
  48 
  49     static boolean failed;
  50 
  51     public static final int LOOPBACK_SCOPE_ID = 0;
  52 
  53     public static final byte[] IN6ADDR_ANY_INIT = { (byte) 0x00, (byte) 0x00,
  54             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  55             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  56             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 };
  57 
  58     public static final byte[] LOOPBACKIPV6ADDRESS = { (byte) 0x00,
  59             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  60             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  61             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01 };
  62 
  63     // fe80::21b:24ff:febd:f29c
  64     public static final byte[] E1000G0IPV6ADDRESS = { (byte) 0xfe, (byte) 0x80,




  25 import java.io.ByteArrayOutputStream;
  26 import java.io.FileNotFoundException;
  27 import java.io.FileOutputStream;
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.io.ObjectOutputStream;
  31 import java.io.PrintStream;
  32 import java.net.Inet6Address;
  33 import java.net.InetAddress;
  34 import java.net.NetworkInterface;
  35 import java.net.UnknownHostException;
  36 import java.util.ArrayList;
  37 import java.util.Arrays;
  38 import java.util.Enumeration;
  39 import java.util.List;
  40 
  41 /**
  42  * @test
  43  * @bug 8007373
  44  * @summary jdk7 backward compatibility serialization problem
  45  * @key intermittent
  46  */
  47 
  48 public class Inet6AddressSerializationTest {
  49 
  50     static boolean failed;
  51 
  52     public static final int LOOPBACK_SCOPE_ID = 0;
  53 
  54     public static final byte[] IN6ADDR_ANY_INIT = { (byte) 0x00, (byte) 0x00,
  55             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  56             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  57             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 };
  58 
  59     public static final byte[] LOOPBACKIPV6ADDRESS = { (byte) 0x00,
  60             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  61             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
  62             (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01 };
  63 
  64     // fe80::21b:24ff:febd:f29c
  65     public static final byte[] E1000G0IPV6ADDRESS = { (byte) 0xfe, (byte) 0x80,


< prev index next >