class ImageObject {

    public String getSegmentType(int segmentNumber) {
        if (log.isDebugEnabled())
            log.debug("getSegmentType:" + segmentNumber);

        if (segmentNumber < 1 || segmentNumber > MAX_SEGMENTS) {
            throw new IllegalArgumentException();
        }

        if (segmentArray[segmentNumber - 1] == null || segmentArray[segmentNumber - 1].length == 0)
            return null;

        byte[] buffer = segmentArray[segmentNumber - 1];
        if (isTypeTiff(buffer)) {
            return TYPE_TIFF;
        } else {
            return TYPE_JPEG;
        }
    }

    public  ImageObject();
    public  ImageObject(CimsObjectHeader header);
    public  ImageObject(ByteArray buffer);

}