completeFileAddress
을 포함하는 최대 절전 모드 List<String>
이 표시됩니다. 내가 List
에서 얻고지도에 값으로 목록 삽입
CompleteFileAddress
은 다음과 같습니다
192.168.1.1/var/local/files/20140116/8800399421_4007_20140116_151718
192.168.1.2/var/local/files/monitor/20140115/9654180710_4006_20140115
192.168.1.1/var/local/files/20140116/8800399421_4007_20140116_120042
192.168.1.1/var/local/files/20140116/138_4007_20140116_122719
는 내가 별도로
IPAddress
및
FilePath
를 얻을 수
CompleteFileAddress
을 분할하고, 키가
IPAddress
이고 값이
FilePath
의 목록입니다 어디
Map<String, List<String>>
의 값을 넣어. 모두
List
의
List list = criteria.list();
for (Iterator it = list.iterator(); it.hasNext();) {
String completeFileAddress = (String) (it.next());
System.out.println("Complete add : " + completeFileAddress);
if (completeFileAddress != null) {
int index = completeFileAddress.indexOf("/");
String serverIP = completeFileAddress.substring(0, index);
String filePath = completeFileAddress.substring(index, completeFileAddress.length()) + ".WAV";
filesMap.put(serverIP, sourceFileList); //sourceFileList is declared as an instance variable
sourceFileList.add(filePath);
}
}
System.out.println("List '1' size :" + filesMap.get("192.168.1.1").size());
System.out.println("List '2' size :" + filesMap.get("192.168.1.2").size());
내가 갖는 크기는 4
하지만 내가 3 개 서버 192.168.1.1
파일 및 192.168.1.2
에 하나를 가지고 나는 List1 = 3
및 List2 = 1
의 크기를 원하는 :
내 코드입니다.
어떻게하면 되나요? ???