Java BufferedReader Read loadLongArray(BufferedReader in)

Here you can find the source of loadLongArray(BufferedReader in)

Description

load Long Array

License

Open Source License

Declaration

public static long[] loadLongArray(BufferedReader in) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;

import java.io.IOException;

public class Main {
    public static long[] loadLongArray(BufferedReader in) {
        try {/*from w w w .j  a va  2 s  .c  om*/
            int dim = Integer.parseInt(in.readLine());
            String[] vals = in.readLine().split("\\s+");
            long[] ret = new long[dim];
            for (int i = 0; i < ret.length; i++) {
                ret[i] = Long.parseLong(vals[i]);
            }
            return ret;
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. loadLines(String fileName)
  2. loadList(File f, String enc)
  3. loadList(final File file)
  4. loadList(String listName)
  5. loadListFromTextFile(String filename, String defaultitem, String linePrefix, String lineSuffix)
  6. loadMetadata(File file)
  7. loadMetaFile(File metaFile)
  8. loadMimeTypes(Reader in, Map extMap, Map mimeMap)
  9. loadModel(String fileName, Hashtable dictionary, Hashtable> modelPairs)