Package org.jnode.fs.hfsplus.catalog

Examples of org.jnode.fs.hfsplus.catalog.CatalogKey


        new byte[]{0, 24, 0, 0, 0, 7, 0, 8, 0, 116, 0, 101, 0, 115, 0, 116, 0, 46, 0, 116, 0, 120, 0, 116};
    String NODE_NAME_AS_STRING = "test.txt";

    @Test
    public void testKeyFromBytesArray() {
        CatalogKey key = new CatalogKey(KEY_AS_BYTES_ARRAY, 0);
        assertEquals(NODE_NAME_AS_STRING, key.getNodeName().getUnicodeString());
        assertEquals(26, key.getKeyLength());
        assertEquals(7, key.getParentId().getId());
    }
View Full Code Here


    @Test
    public void testConstructFromCNIDAndString() {
        CatalogNodeId id = CatalogNodeId.HFSPLUS_START_CNID;
        HfsUnicodeString string = new HfsUnicodeString(NODE_NAME_AS_STRING);
        CatalogKey key = new CatalogKey(id, string);
        assertEquals(NODE_NAME_AS_STRING, key.getNodeName().getUnicodeString());
        assertEquals(24, key.getKeyLength());
        assertEquals(7, key.getParentId().getId());

    }
View Full Code Here

    @Test
    public void testConstructFromCNIDAndEmptyString() {
        CatalogNodeId id = CatalogNodeId.HFSPLUS_START_CNID;
        HfsUnicodeString string = new HfsUnicodeString("");
        CatalogKey key = new CatalogKey(id, string);
        assertEquals("", key.getNodeName().getUnicodeString());
        assertEquals(8, key.getKeyLength());
        assertEquals(7, key.getParentId().getId());

    }
View Full Code Here

TOP

Related Classes of org.jnode.fs.hfsplus.catalog.CatalogKey

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.