mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-29 11:49:29 +00:00
text file changes
This commit is contained in:
parent
7c51072a10
commit
26d218621b
@ -8,11 +8,13 @@ import com.bytezone.diskbrowser.utilities.HexFormatter;
|
|||||||
public class BasicTextFile extends TextFile
|
public class BasicTextFile extends TextFile
|
||||||
// -----------------------------------------------------------------------------------//
|
// -----------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
|
private static String underline = "------------------------------------------"
|
||||||
|
+ "------------------------------------\n";
|
||||||
|
private static String fullUnderline = "---------- ------- " + underline;
|
||||||
private int recordLength; // prodos aux
|
private int recordLength; // prodos aux
|
||||||
private List<TextBuffer> buffers; // only used if it is a Prodos text file
|
private List<TextBuffer> buffers; // only used if it is a Prodos text file
|
||||||
private int eof;
|
private int eof;
|
||||||
private boolean prodosFile;
|
private boolean prodosFile;
|
||||||
// test
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
public BasicTextFile (String name, byte[] buffer)
|
public BasicTextFile (String name, byte[] buffer)
|
||||||
@ -96,13 +98,12 @@ public class BasicTextFile extends TextFile
|
|||||||
if (textPreferences.showTextOffsets)
|
if (textPreferences.showTextOffsets)
|
||||||
{
|
{
|
||||||
text.append (" Offset Record# Text values\n");
|
text.append (" Offset Record# Text values\n");
|
||||||
text.append (
|
text.append (fullUnderline);
|
||||||
"---------- ------- -------------------------------------------------------\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text.append ("Text values\n");
|
text.append ("Text values\n");
|
||||||
text.append ("-------------------------------------------------------\n");
|
text.append (underline);
|
||||||
}
|
}
|
||||||
return knownLength (text, 0).toString ();
|
return knownLength (text, 0).toString ();
|
||||||
}
|
}
|
||||||
@ -114,13 +115,12 @@ public class BasicTextFile extends TextFile
|
|||||||
if (textPreferences.showTextOffsets)
|
if (textPreferences.showTextOffsets)
|
||||||
{
|
{
|
||||||
text.append (" Offset Record# Text values\n");
|
text.append (" Offset Record# Text values\n");
|
||||||
text.append (
|
text.append (fullUnderline);
|
||||||
"---------- ------- -------------------------------------------------------\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text.append ("Text values\n");
|
text.append ("Text values\n");
|
||||||
text.append ("-------------------------------------------------------\n");
|
text.append (underline);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (TextBuffer tb : buffers)
|
for (TextBuffer tb : buffers)
|
||||||
@ -177,19 +177,16 @@ public class BasicTextFile extends TextFile
|
|||||||
int ptr = 0;
|
int ptr = 0;
|
||||||
int size = buffer.length;
|
int size = buffer.length;
|
||||||
int lastVal = 0;
|
int lastVal = 0;
|
||||||
// boolean showAllOffsets = true;
|
|
||||||
|
|
||||||
if (textPreferences.showTextOffsets)
|
if (textPreferences.showTextOffsets)
|
||||||
{
|
{
|
||||||
text.append (" Offset Text values\n");
|
text.append (" Offset Text values\n");
|
||||||
text.append ("---------- -------------------------------------------------------"
|
text.append ("---------- " + underline);
|
||||||
+ "-------------------\n");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
text.append (" Text values\n");
|
text.append (" Text values\n");
|
||||||
text.append ("-------------------------------------------------------"
|
text.append (underline);
|
||||||
+ "-------------------------------\n");
|
|
||||||
}
|
}
|
||||||
if (buffer.length == 0)
|
if (buffer.length == 0)
|
||||||
return text.toString ();
|
return text.toString ();
|
||||||
|
Loading…
Reference in New Issue
Block a user