dmolony-DiskBrowser/src/com/bytezone/diskbrowser/applefile/DeviceDriver.java

36 lines
1.0 KiB
Java
Raw Normal View History

2017-01-22 06:55:51 +00:00
package com.bytezone.diskbrowser.applefile;
public class DeviceDriver extends AbstractFile
{
private final int auxType;
private final int classifications;
private final int driverClass;
private final boolean inactive;
public DeviceDriver (String name, byte[] buffer, int auxType)
{
super (name, buffer);
this.auxType = auxType;
classifications = auxType & 0xFF;
driverClass = (auxType & 0x7F00) >>> 8;
inactive = (auxType & 0x8000) != 0;
}
@Override
public String getText ()
{
StringBuilder text = new StringBuilder ("Name : " + name + "\n\n");
text.append ("Apple IIGS Device Driver File\n\n");
text.append (String.format ("Classifications ... %02X%n", classifications));
text.append (String.format ("Driver Class ...... %02X%n", driverClass));
2018-04-25 20:41:03 +00:00
text.append (String.format ("Aux type .......... %d%n", auxType));
2017-01-22 06:55:51 +00:00
text.append (String.format ("Inactive .......... %s%n", inactive ? "True" : "False"));
text.deleteCharAt (text.length () - 1);
return text.toString ();
}
}