Package org.apache.poi.hssf.record.HyperlinkRecord

Examples of org.apache.poi.hssf.record.HyperlinkRecord.GUID


      throw new AssertionFailedError("Identified bug with option URL and UNC set at same time");
    }
  }
 
  public void testGUID() {
    GUID g;
    g = GUID.parse("3F2504E0-4F89-11D3-9A0C-0305E82C3301");
    confirmGUID(g, 0x3F2504E0, 0x4F89, 0x11D3, 0x9A0C0305E82C3301L);
    assertEquals("3F2504E0-4F89-11D3-9A0C-0305E82C3301", g.formatAsString());

    g = GUID.parse("13579BDF-0246-8ACE-0123-456789ABCDEF");
    confirmGUID(g, 0x13579BDF, 0x0246, 0x8ACE, 0x0123456789ABCDEFL);
    assertEquals("13579BDF-0246-8ACE-0123-456789ABCDEF", g.formatAsString());

    byte[] buf = new byte[16];
    g.serialize(new LittleEndianByteArrayOutputStream(buf, 0));
    String expectedDump = "[DF, 9B, 57, 13, 46, 02, CE, 8A, 01, 23, 45, 67, 89, AB, CD, EF]";
    assertEquals(expectedDump, HexDump.toHex(buf));

    // STD Moniker
    g = createFromStreamDump("[D0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9D0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // URL Moniker
    g = createFromStreamDump("[E0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9E0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // File Moniker
    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }
View Full Code Here


    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }

  private static GUID createFromStreamDump(String s) {
    return new GUID(new LittleEndianByteArrayInputStream(HexRead.readFromString(s)));
  }
View Full Code Here

      throw new AssertionFailedError("Identified bug with option URL and UNC set at same time");
    }
  }
 
  public void testGUID() {
    GUID g;
    g = GUID.parse("3F2504E0-4F89-11D3-9A0C-0305E82C3301");
    confirmGUID(g, 0x3F2504E0, 0x4F89, 0x11D3, 0x9A0C0305E82C3301L);
    assertEquals("3F2504E0-4F89-11D3-9A0C-0305E82C3301", g.formatAsString());

    g = GUID.parse("13579BDF-0246-8ACE-0123-456789ABCDEF");
    confirmGUID(g, 0x13579BDF, 0x0246, 0x8ACE, 0x0123456789ABCDEFL);
    assertEquals("13579BDF-0246-8ACE-0123-456789ABCDEF", g.formatAsString());

    byte[] buf = new byte[16];
    g.serialize(new LittleEndianByteArrayOutputStream(buf, 0));
    String expectedDump = "[DF, 9B, 57, 13, 46, 02, CE, 8A, 01, 23, 45, 67, 89, AB, CD, EF]";
    assertEquals(expectedDump, HexDump.toHex(buf));

    // STD Moniker
    g = createFromStreamDump("[D0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9D0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // URL Moniker
    g = createFromStreamDump("[E0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9E0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // File Moniker
    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }
View Full Code Here

    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }

  private static GUID createFromStreamDump(String s) {
    return new GUID(new LittleEndianByteArrayInputStream(HexRead.readFromString(s)));
  }
View Full Code Here

      throw new AssertionFailedError("Identified bug with option URL and UNC set at same time");
    }
  }
 
  public void testGUID() {
    GUID g;
    g = GUID.parse("3F2504E0-4F89-11D3-9A0C-0305E82C3301");
    confirmGUID(g, 0x3F2504E0, 0x4F89, 0x11D3, 0x9A0C0305E82C3301L);
    assertEquals("3F2504E0-4F89-11D3-9A0C-0305E82C3301", g.formatAsString());

    g = GUID.parse("13579BDF-0246-8ACE-0123-456789ABCDEF");
    confirmGUID(g, 0x13579BDF, 0x0246, 0x8ACE, 0x0123456789ABCDEFL);
    assertEquals("13579BDF-0246-8ACE-0123-456789ABCDEF", g.formatAsString());

    byte[] buf = new byte[16];
    g.serialize(new LittleEndianByteArrayOutputStream(buf, 0));
    String expectedDump = "[DF, 9B, 57, 13, 46, 02, CE, 8A, 01, 23, 45, 67, 89, AB, CD, EF]";
    assertEquals(expectedDump, HexDump.toHex(buf));

    // STD Moniker
    g = createFromStreamDump("[D0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9D0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // URL Moniker
    g = createFromStreamDump("[E0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9E0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // File Moniker
    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }
View Full Code Here

    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }

  private static GUID createFromStreamDump(String s) {
    return new GUID(new LittleEndianByteArrayInputStream(HexRead.readFromString(s)));
  }
View Full Code Here

    byte[] ser = hr.serialize();
    TestcaseRecordInputStream.confirmRecordEncoding(HyperlinkRecord.sid, dataUNC, ser);
  }
 
  public void testGUID() {
    GUID g;
    g = GUID.parse("3F2504E0-4F89-11D3-9A0C-0305E82C3301");
    confirmGUID(g, 0x3F2504E0, 0x4F89, 0x11D3, 0x9A0C0305E82C3301L);
    assertEquals("3F2504E0-4F89-11D3-9A0C-0305E82C3301", g.formatAsString());

    g = GUID.parse("13579BDF-0246-8ACE-0123-456789ABCDEF");
    confirmGUID(g, 0x13579BDF, 0x0246, 0x8ACE, 0x0123456789ABCDEFL);
    assertEquals("13579BDF-0246-8ACE-0123-456789ABCDEF", g.formatAsString());

    byte[] buf = new byte[16];
    g.serialize(new LittleEndianByteArrayOutputStream(buf, 0));
    String expectedDump = "[DF, 9B, 57, 13, 46, 02, CE, 8A, 01, 23, 45, 67, 89, AB, CD, EF]";
    assertEquals(expectedDump, HexDump.toHex(buf));

    // STD Moniker
    g = createFromStreamDump("[D0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9D0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // URL Moniker
    g = createFromStreamDump("[E0, C9, EA, 79, F9, BA, CE, 11, 8C, 82, 00, AA, 00, 4B, A9, 0B]");
    assertEquals("79EAC9E0-BAF9-11CE-8C82-00AA004BA90B", g.formatAsString());
    // File Moniker
    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }
View Full Code Here

    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }

  private static GUID createFromStreamDump(String s) {
    return new GUID(new LittleEndianByteArrayInputStream(HexRead.readFromString(s)));
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.HyperlinkRecord.GUID

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.