Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.FileInputStream;
- import java.io.IOException;
- import java.io.InputStreamReader;
- /**
- * Created by Eric on 2015-03-06.
- */
- public class Main {
- public static void main(String[] args) throws IOException {
- }
- private String[] readFile() throws IOException{
- //statisk array storlek (typ array[5000] eller en arraylist eller dylikt)
- FileInputStream file = new FileInputStream("fil");
- BufferedReader br = new BufferedReader(new InputStreamReader(file));
- try {
- String content = br.readLine();
- String[] array = content.split("[\"]+[a-zA-Z]*[\"]+[ ]+"); //osäker på regex, men du fattar principen.
- } finally {
- br.close();
- }
- return array;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement