Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.FileInputStream;
  3. import java.io.IOException;
  4. import java.io.InputStreamReader;
  5.  
  6. /**
  7.  * Created by Eric on 2015-03-06.
  8.  */
  9. public class Main {
  10.     public static void main(String[] args) throws IOException {
  11.  
  12.     }
  13.  
  14.     private String[] readFile() throws  IOException{
  15.         //statisk array storlek (typ array[5000] eller en arraylist eller dylikt)
  16.         FileInputStream file = new FileInputStream("fil");
  17.         BufferedReader br = new BufferedReader(new InputStreamReader(file));
  18.         try {
  19.             String content = br.readLine();
  20.             String[] array = content.split("[\"]+[a-zA-Z]*[\"]+[ ]+"); //osäker på regex, men du fattar principen.
  21.  
  22.  
  23.         } finally {
  24.             br.close();
  25.         }
  26.         return array;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement