1. /*
  2. * @(#)JPEGStreamMetadataFormat.java 1.5 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.imageio.plugins.jpeg;
  8. import javax.imageio.metadata.IIOMetadataFormat;
  9. import javax.imageio.metadata.IIOMetadataFormatImpl;
  10. public class JPEGStreamMetadataFormat extends JPEGMetadataFormat {
  11. private static JPEGStreamMetadataFormat theInstance = null;
  12. private JPEGStreamMetadataFormat() {
  13. super(JPEG.nativeStreamMetadataFormatName,
  14. CHILD_POLICY_SEQUENCE);
  15. addStreamElements(getRootName());
  16. }
  17. public static synchronized IIOMetadataFormat getInstance() {
  18. if (theInstance == null) {
  19. theInstance = new JPEGStreamMetadataFormat();
  20. }
  21. return theInstance;
  22. }
  23. }