dmolony-DiskBrowser/src/com/bytezone/diskbrowser/disk/DefaultSector.java

35 lines
1.2 KiB
Java
Raw Normal View History

2020-02-08 08:13:28 +00:00
package com.bytezone.diskbrowser.disk;
import com.bytezone.diskbrowser.utilities.HexFormatter;
// -----------------------------------------------------------------------------------//
public class DefaultSector extends AbstractSector
// -----------------------------------------------------------------------------------//
{
String name;
// ---------------------------------------------------------------------------------//
public DefaultSector (String name, Disk disk, byte[] buffer, DiskAddress diskAddress)
// ---------------------------------------------------------------------------------//
{
super (disk, buffer, diskAddress);
this.name = name;
}
// ---------------------------------------------------------------------------------//
@Override
public String createText ()
// ---------------------------------------------------------------------------------//
{
return name + "\n\n" + HexFormatter.format (buffer, 0, buffer.length);
}
// ---------------------------------------------------------------------------------//
@Override
public String toString ()
// ---------------------------------------------------------------------------------//
{
return name;
}
}