public Segment(int marker) throws IOException {
  this.marker=marker;
  if (marker != 0) {
    out.writeShort(marker);
    offset=getStreamPosition();
    if (!standaloneMarkers.contains(marker)) {
      out.writeShort(0);
    }
  }
}

public Segment ( int marker ) throws IOException { this . marker = marker ; if ( marker != 0 ) { out . writeShort ( marker ) ; offset = getStreamPosition ( ) ; if ( ! standaloneMarkers . contains ( marker ) ) { out . writeShort ( 0 ) ; } } }
creates a new chunk at the current position of the imageoutputstream .
