out.write ((byte) 0); bytes += name.length + 1;
bytes += name.length;
  private int write_entry (ZipEntry entry, boolean is_local)    throws IOException  {    long offset = bytes_written;    int bytes = put4 (is_local ? 0x04034b50 : 0x02014b50);    if (! is_local)      bytes += put_version ();    bytes += put_version ();    boolean crc_after = false;    if (is_local	&& (entry.getCrc() == -1 || entry.getCompressedSize() == -1	    || entry.getSize() == -1))      crc_after = true;    // For the bits field we always indicate `normal' compression,    // even if that isn't true.    bytes += put2 (crc_after ? (1 << 3) : 0);    bytes += put2 (entry.method);    bytes += put2(0);  // time - FIXME    bytes += put2(0);  // date - FIXME    if (crc_after)      {	// CRC, compressedSize, and Size are always 0 in this header.	// The actual values are given after the entry.	bytes += put4 (0);	bytes += put4 (0);	bytes += put4 (0);      }    else      {	bytes += put4 ((int) (entry.getCrc()));	bytes += put4 ((int) (entry.getCompressedSize()));	bytes += put4 ((int) (entry.getSize()));      }    byte[] name = entry.name.getBytes("8859_1");    bytes += put2 (name.length);    bytes += put2 (entry.extra == null ? 0 : entry.extra.length);    byte[] comment = null;    if (! is_local)      {	if (entry.getComment() == null)	  bytes += put2 (0);	else	  {	    comment = entry.getComment().getBytes("8859_1");	    bytes += put2 (comment.length);	  }	// Disk number start.	bytes += put2 (0);	// Internal file attributes.	bytes += put2 (0);	// External file attributes.	bytes += put2 (0);	// Relative offset of local header.	bytes += put2 ((int) offset);      }    out.write (name);    out.write ((byte) 0);    bytes += name.length + 1;    if (entry.extra != null)      {	out.write(entry.extra);	out.write((byte) 0);	bytes += entry.extra.length + 1;      }    if (comment != null)      {	out.write(comment);	out.write((byte) 0);	bytes += comment.length + 1;      }    bytes_written += bytes;    return bytes;  }