Package com.fasterxml.uuid

Examples of com.fasterxml.uuid.EthernetAddress.asByteArray()


        for (int i = 0; i < ethernet_address_array.length; i++)
        {
            byte[] ethernet_address = ethernet_address_array[i].asByteArray();
            // check that none of the EthernetAddresses are null
            assertFalse("dummy EthernetAddress was null",
                    Arrays.equals(null_ethernet_address.asByteArray(),
                                ethernet_address));
           
            // check that the "broadcast" bit is set in the created address
            /* 08-Feb-2004, TSa: Fixed as per fix to actual code; apparently
             *   broadcast bit is LSB, not MSB.
View Full Code Here


       
        // first we'll test the null EthernetAddress
        EthernetAddress ethernet_address = new EthernetAddress(0L);
        assertEquals("Expected length of returned array wrong",
            ETHERNET_ADDRESS_ARRAY_LENGTH,
            ethernet_address.asByteArray().length);
        assertEthernetAddressArraysAreEqual(
            NULL_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
       
        // now test a non-null EthernetAddress
View Full Code Here

        assertEquals("Expected length of returned array wrong",
            ETHERNET_ADDRESS_ARRAY_LENGTH,
            ethernet_address.asByteArray().length);
        assertEthernetAddressArraysAreEqual(
            NULL_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
       
        // now test a non-null EthernetAddress
        ethernet_address = new EthernetAddress(VALID_ETHERNET_ADDRESS_LONG);
        assertEquals("Expected length of returned array wrong",
            ETHERNET_ADDRESS_ARRAY_LENGTH,
View Full Code Here

       
        // now test a non-null EthernetAddress
        ethernet_address = new EthernetAddress(VALID_ETHERNET_ADDRESS_LONG);
        assertEquals("Expected length of returned array wrong",
            ETHERNET_ADDRESS_ARRAY_LENGTH,
            ethernet_address.asByteArray().length);
        assertEthernetAddressArraysAreEqual(
            VALID_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
       
        // let's make sure that changing the returned array doesn't mess with
View Full Code Here

        assertEquals("Expected length of returned array wrong",
            ETHERNET_ADDRESS_ARRAY_LENGTH,
            ethernet_address.asByteArray().length);
        assertEthernetAddressArraysAreEqual(
            VALID_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
       
        // let's make sure that changing the returned array doesn't mess with
        // the wrapped EthernetAddress's internals
        byte[] ethernet_address_byte_array = ethernet_address.asByteArray();
        // we'll just stir it up a bit and then check that the original
View Full Code Here

            VALID_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
       
        // let's make sure that changing the returned array doesn't mess with
        // the wrapped EthernetAddress's internals
        byte[] ethernet_address_byte_array = ethernet_address.asByteArray();
        // we'll just stir it up a bit and then check that the original
        // EthernetAddress was not changed in the process.
        // The easiest stir is to sort it ;)
        Arrays.sort(ethernet_address_byte_array);
        assertEthernetAddressArraysAreNotEqual(
View Full Code Here

        Arrays.sort(ethernet_address_byte_array);
        assertEthernetAddressArraysAreNotEqual(
            VALID_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address_byte_array, 0);
        assertEthernetAddressArraysAreNotEqual(
            ethernet_address.asByteArray(), 0,
            ethernet_address_byte_array, 0);
        assertEthernetAddressArraysAreEqual(
            VALID_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
    }
View Full Code Here

        assertEthernetAddressArraysAreNotEqual(
            ethernet_address.asByteArray(), 0,
            ethernet_address_byte_array, 0);
        assertEthernetAddressArraysAreEqual(
            VALID_ETHERNET_ADDRESS_BYTE_ARRAY, 0,
            ethernet_address.asByteArray(), 0);
    }
   
    /**
     * Test of clone method, of class com.fasterxml.uuid.EthernetAddress.
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.