Class ExtractJpegSegmentTool


  • public class ExtractJpegSegmentTool
    extends java.lang.Object
    Extracts JPEG segments and writes them to individual files.

    Extracting only the required segment(s) for use in unit testing has several benefits:

    • Helps reduce the repository size. For example a small JPEG image may still be 20kB+ in size, yet its APPD (IPTC) segment may be as small as 200 bytes.
    • Makes unit tests run more rapidly.
    • Partially anonymises user-contributed data by removing image portions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      private static void printUsage()  
      static void saveSegmentFiles​(java.lang.String jpegFilePath, JpegSegmentData segmentData)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExtractJpegSegmentTool

        public ExtractJpegSegmentTool()
    • Method Detail

      • saveSegmentFiles

        public static void saveSegmentFiles​(java.lang.String jpegFilePath,
                                            JpegSegmentData segmentData)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • printUsage

        private static void printUsage()