Author: bback
Date: 2006-03-13 10:26:06 +0000 (Mon, 13 Mar 2006)
New Revision: 8238
Modified:
trunk/apps/frost-0.7/source/frost/FileAccess.java
trunk/apps/frost-0.7/source/frost/SettingsFun.java
Log:
preparation for reenabled altEdit support
Modified: trunk/apps/frost-0.7/source/frost/FileAccess.java
===================================================================
--- trunk/apps/frost-0.7/source/frost/FileAccess.java 2006-03-13 03:29:19 UTC
(rev 8237)
+++ trunk/apps/frost-0.7/source/frost/FileAccess.java 2006-03-13 10:26:06 UTC
(rev 8238)
@@ -23,8 +23,8 @@
import java.io.*;
import java.nio.channels.*;
import java.util.*;
+import java.util.List;
import java.util.logging.*;
-import java.util.zip.*;
import javax.swing.*;
@@ -179,13 +179,13 @@
/**
* Reads file and returns a Vector of lines
*/
- public static Vector readLines(File file) {
+ public static List readLines(File file) {
return readLines(file.getPath());
}
- public static Vector readLines(String path) {
+ public static List readLines(String path) {
String line;
- Vector data = new Vector();
+ ArrayList data = new ArrayList();
try {
BufferedReader f = new BufferedReader(new FileReader(path));
while( (line = f.readLine()) != null ) {
Modified: trunk/apps/frost-0.7/source/frost/SettingsFun.java
===================================================================
--- trunk/apps/frost-0.7/source/frost/SettingsFun.java 2006-03-13 03:29:19 UTC
(rev 8237)
+++ trunk/apps/frost-0.7/source/frost/SettingsFun.java 2006-03-13 10:26:06 UTC
(rev 8238)
@@ -19,9 +19,9 @@
package frost;
-import java.io.File;
-import java.util.Vector;
-import java.util.logging.Logger;
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
public class SettingsFun
{
@@ -43,7 +43,7 @@
File checkFile = new File(filename);
if( checkFile.isFile() )
{
- Vector lines = FileAccess.readLines(filename);
+ List lines = FileAccess.readLines(filename);
return getValue( lines, value );
}
return "";
@@ -55,11 +55,11 @@
* @param value the requested value
* @return String the requested value as a String
*/
- public static String getValue(Vector lines, String value)
+ public static String getValue(List lines, String value)
{
for( int i = 0; i < lines.size(); i++ )
{
- String line = (String)lines.elementAt(i);
+ String line = (String)lines.get(i);
if( line.startsWith(value + "=") || line.startsWith(value + " ") )
{
if( line.indexOf("=") != -1 )