📄 trackheader310.java
字号:
package net.aetherial.gis.garmin;
import java.io.*;
import java.util.*;
import net.aetherial.gis.garmin.*;
import net.aetherial.gis.excel.myTest;
class TrackHeader310 extends TrackHeader
{
boolean display;
byte color;
String identifier;
public TrackHeader310 (byte[] contents)
{
ByteArrayInputStream bais = new ByteArrayInputStream (contents);
if (bais.read () == 0 && bais.read () == 0)
display = false;
color = (byte) bais.read ();
ByteArrayOutputStream baos = new ByteArrayOutputStream ();
for (byte b = (byte) bais.read (); b != 0; b = (byte) bais.read ())
{
baos.write (b);
}
byte[] ba = baos.toByteArray ();
try
{
identifier = new String (ba, 0, ba.length, "gb2312");
}
catch (UnsupportedEncodingException e)
{
identifier = new String ("");
}
}
public void printDetails ()
{
System.out.println ("This is a debugging tool for dumping track header details.");
System.out.println ("Track header color: "+color);
System.out.println ("Track header identifier: "+identifier);
//myTest.name.addElement(identifier);
//myTest.lat.addElement("999.9");
//myTest.lon.addElement("999.9");
if (display == true)
System.out.println ("This track is displayed.");
System.out.println ("");
}
public String getIdentifier ()
{
return identifier;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -