<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You mean adding it as a separate header
variable?<br>
<br>
Regards,<br>
Peter<br>
<br>
On 01.07.2015 08:02, John Zhao wrote:<br>
</div>
<blockquote
cite="mid:CA+EBg9RVyBbP+2M4PwLrA_BB8muQuxxW8EWFzYZa982D-0Gv0g@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Peter,
<div><br>
</div>
<div>Thanks for your reply.</div>
<div>I think we can add it to headers[21].</div>
<div>But nvm, not big deal.</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature"><b>Best Regards,</b>
<div><b>ZhiQiang ZHAO</b></div>
</div>
</div>
<br>
<div class="gmail_quote">On Tue, Jun 30, 2015 at 10:55 PM, Peter
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:graphhopper@gmx.de" target="_blank">graphhopper@gmx.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi John,<br>
<br>
yes, this is a bit waste of space :)<br>
<br>
But the empty space is to avoid thinking about header
size in the consuming class but mainly to avoid breaking
the file format when we insert new data there.<br>
<br>
Regards,<br>
Peter
<div>
<div class="h5"><br>
<br>
On 01.07.2015 02:04, John Zhao wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Hi,
<div><br>
</div>
<div>
<div><span
style="color:rgb(128,128,128);font-family:Menlo;font-size:12pt;font-style:italic">/**<br>
</span><span
style="color:rgb(128,128,128);font-family:Menlo;font-size:12pt;font-style:italic"> * Writes some internal data into the beginning of the specified file.<br>
</span><span
style="color:rgb(128,128,128);font-family:Menlo;font-size:12pt;font-style:italic"> */<br>
</span><span
style="color:rgb(0,0,128);font-family:Menlo;font-size:12pt;font-weight:bold">protected void </span><font
face="Menlo"><span style="font-size:12pt">writeHeader( RandomAccessFile file, </span></font><span
style="color:rgb(0,0,128);font-family:Menlo;font-size:12pt;font-weight:bold">long </span><font
face="Menlo"><span style="font-size:12pt">length, </span></font><span
style="color:rgb(0,0,128);font-family:Menlo;font-size:12pt;font-weight:bold">int </span><font
face="Menlo"><span style="font-size:12pt">segmentSize ) </span></font><span
style="color:rgb(0,0,128);font-family:Menlo;font-size:12pt;font-weight:bold">throws </span><font
face="Menlo"><span style="font-size:12pt">IOException</span></font><br>
<font face="Menlo"><span
style="font-size:12pt">{</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt"> file.seek(</span></font><span
style="color:rgb(0,0,255);font-family:Menlo;font-size:12pt">0</span><font
face="Menlo"><span style="font-size:12pt">);</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt"> file.writeUTF(</span></font><span
style="color:rgb(0,128,0);font-family:Menlo;font-size:12pt;font-weight:bold">"GH</span><font
color="#008000" face="Menlo"><span
style="font-size:16px"><b>”</b></span></font><font
face="Menlo"><span style="font-size:12pt">);
// 4 bytes</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt">
file.writeLong(length); // 8 bytes</span></font><br>
<font face="Menlo"><span
style="font-size:12pt">
file.writeInt(segmentSize); // 4 bytes</span></font><br>
<font face="Menlo"><span
style="font-size:12pt"> </span></font> <span
style="color:rgb(0,0,128);font-family:Menlo;font-size:12pt;font-weight:bold">for </span><font
face="Menlo"><span style="font-size:12pt">(</span></font><span
style="color:rgb(0,0,128);font-family:Menlo;font-size:12pt;font-weight:bold">int </span><font
face="Menlo"><span style="font-size:12pt">i = </span></font><span
style="color:rgb(0,0,255);font-family:Menlo;font-size:12pt">0</span><font
face="Menlo"><span style="font-size:12pt">; i < </span></font><span
style="color:rgb(102,14,122);font-family:Menlo;font-size:12pt;font-weight:bold">header</span><font
face="Menlo"><span style="font-size:12pt">.</span></font><span
style="color:rgb(102,14,122);font-family:Menlo;font-size:12pt;font-weight:bold">length</span><font
face="Menlo"><span style="font-size:12pt">; i++)</span></font><br>
<font face="Menlo"><span
style="font-size:12pt"> {</span></font><br>
<font face="Menlo"><span
style="font-size:12pt">
file.writeInt(</span></font><span
style="color:rgb(102,14,122);font-family:Menlo;font-size:12pt;font-weight:bold">header</span><font
face="Menlo"><span style="font-size:12pt">[i]);</span></font><br>
<font face="Menlo"><span
style="font-size:12pt"> }</span></font>
</div>
<div><font face="Menlo"><span
style="font-size:12pt">}</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt"><br>
</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt">it's totally 100
bytes.</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt">We only use 96
bytes of them.</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt"><br>
</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt">It's not a problem.</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt">Just curious.</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt"><br>
</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt">It's better to use
them all, to reduce any further question.
:)</span></font></div>
<div><font face="Menlo"><span
style="font-size:12pt"><br>
</span></font></div>
<div>
<div><b>Best Regards,</b>
<div><b>ZhiQiang ZHAO</b></div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>