示例#1
0
  public static void strings(List<ArgumentWrapper> argsArray, Session currentSession) {
    // Get path from arguments
    String path = Common.getParamString(argsArray, "path");

    ArrayList<String> lines = Common.strings(path);
    Iterator<String> it = lines.iterator();

    currentSession.startTransmission();
    currentSession.startResponse();
    currentSession.startData();

    while (it.hasNext()) currentSession.send(it.next() + "\n", true); // Send this with newline

    currentSession.endData();
    currentSession.noError();
    currentSession.endResponse();
    currentSession.endTransmission();
  }