void parseLine(String line) throws UnsupportedEncodingException {
    String[] splits = line.split(" ");

    boolean isDir = "dir".equals(splits[1]) ? true: false;
    if (!isDir && splits.length >= 6) {
      String name = URLDecoder.decode(splits[0], "UTF-8");
      String partName = URLDecoder.decode(splits[2], "UTF-8");
      long startIndex = Long.parseLong(splits[3]);
      long length = Long.parseLong(splits[4]);
      String[] newsplits = URLDecoder.decode(splits[5],"UTF-8").split(" ");
      if (newsplits != null && newsplits.length >= 5) {
        long mtime = Long.parseLong(newsplits[0]);
        IndexEntry entry = new IndexEntry(
          name, startIndex, length, mtime, partName);
        entries.add(entry);
      }
    }
  }
void parseLine ( String line ) throws UnsupportedEncodingException { String [ ] splits = line . split ( " " ) ; boolean isDir = "dir" . equals ( splits [ 1 ] ) ? true : false ; if ( ! isDir && splits . length >= 6 ) { String name = URLDecoder . decode ( splits [ 0 ] , "UTF-8" ) ; String partName = URLDecoder . decode ( splits [ 2 ] , "UTF-8" ) ; long startIndex = Long . parseLong ( splits [ 3 ] ) ; long length = Long . parseLong ( splits [ 4 ] ) ; String [ ] newsplits = URLDecoder . decode ( splits [ 5 ] , "UTF-8" ) . split ( " " ) ; if ( newsplits != null && newsplits . length >= 5 ) { long mtime = Long . parseLong ( newsplits [ 0 ] ) ; IndexEntry entry = new IndexEntry ( name , startIndex , length , mtime , partName ) ; entries . add ( entry ) ; } } }
Parses each line and extracts relevant information.
@param line
@throws UnsupportedEncodingException