(int first, int last, FileInfo fi)
| 770 | } |
| 771 | |
| 772 | void getProperties(int first, int last, FileInfo fi) throws IOException { |
| 773 | fi.properties = new String[last-first+1]; |
| 774 | int index = 0; |
| 775 | byte[] buffer = new byte[metaDataCounts[first]]; |
| 776 | for (int i=first; i<=last; i++) { |
| 777 | int len = metaDataCounts[i]; |
| 778 | if (len>buffer.length) |
| 779 | buffer = new byte[len]; |
| 780 | in.readFully(buffer, len); |
| 781 | len /= 2; |
| 782 | char[] chars = new char[len]; |
| 783 | if (littleEndian) { |
| 784 | for (int j=0, k=0; j<len; j++) |
| 785 | chars[j] = (char)(buffer[k++]&255 + ((buffer[k++]&255)<<8)); |
| 786 | } else { |
| 787 | for (int j=0, k=0; j<len; j++) |
| 788 | chars[j] = (char)(((buffer[k++]&255)<<8) + (buffer[k++]&255)); |
| 789 | } |
| 790 | fi.properties[index++] = new String(chars); |
| 791 | } |
| 792 | } |
| 793 | |
| 794 | void error(String message) throws IOException { |
| 795 | if (in!=null) in.close(); |
no test coverage detected