mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-25 16:34:00 +00:00
Update SimpleText.java
This commit is contained in:
parent
6cc3e64071
commit
504d8f467e
@ -1,16 +1,22 @@
|
||||
package com.bytezone.diskbrowser.applefile;
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
public class SimpleText extends AbstractFile
|
||||
// -----------------------------------------------------------------------------------//
|
||||
{
|
||||
// LISA text file
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public SimpleText (String name, byte[] buffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (name, buffer);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
@Override
|
||||
public String getText ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder text = new StringBuilder ();
|
||||
|
||||
@ -29,7 +35,9 @@ public class SimpleText extends AbstractFile
|
||||
return text.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
private String getLine (int ptr)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
StringBuilder line = new StringBuilder ();
|
||||
|
||||
@ -40,7 +48,9 @@ public class SimpleText extends AbstractFile
|
||||
return line.toString ();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------//
|
||||
public static boolean isHTML (byte[] buffer)
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
String text = new String (buffer, 0, buffer.length);
|
||||
if (text.indexOf ("HTML") > 0 || text.indexOf ("html") > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user