1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
/*
* Created on 15.02.2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.gnu.pilotlink;
/**
* @author stephan
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class FTB3CostCatRecord extends Record {
private String name;
/**
*
*/
public FTB3CostCatRecord() {
super();
// TODO Auto-generated constructor stub
}
/**
* @param i
* @param att
* @param cat
* @param sz
*/
public FTB3CostCatRecord(int i, int att, int cat, int sz) {
super(i, att, cat, sz);
// TODO Auto-generated constructor stub
}
/**
* @param r
*/
public FTB3CostCatRecord(Record r) {
super(r);
// TODO Auto-generated constructor stub
}
/* (non-Javadoc)
* @see org.gnu.pilotlink.Record#getBuffer()
*/
public byte[] getBuffer() {
byte buf[]=new byte[0x48];
if (name==null) {
return buf;
}
if (name.length()>0x40) {
name=name.substring(0,0x40);
}
setStringAt(buf,name,0x08);
return buf;
}
/* (non-Javadoc)
* @see org.gnu.pilotlink.Record#setBuffer(byte[])
*/
public void setBuffer(byte[] buf) {
name=getStringAt(buf,0x08);
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name= name;
}
public String toString(){
return ""+name;
}
}
|