(DBElement element)
| 823 | } |
| 824 | |
| 825 | private int encodeList(DBElement element) |
| 826 | throws DBException |
| 827 | { |
| 828 | DBList list = (DBList)element.getValue(); |
| 829 | int listCount = list.getElementCount(); |
| 830 | int listLength = (listCount + 1) * 4; |
| 831 | if (this.listIndicesLength + listLength > this.listIndicesSize) { |
| 832 | int increment = Math.max(listLength, 2000); |
| 833 | this.listIndicesSize += increment; |
| 834 | byte[] buffer = new byte[this.listIndicesSize]; |
| 835 | System.arraycopy(this.listIndicesBuffer, 0, buffer, 0, this.listIndicesLength); |
| 836 | this.listIndicesBuffer = buffer; |
| 837 | } |
| 838 | |
| 839 | int listOffset = this.listIndicesLength; |
| 840 | this.listIndicesLength += listLength; |
| 841 | setInteger(listCount, this.listIndicesBuffer, listOffset); |
| 842 | |
| 843 | for (int i = 0; i < listCount; i++) { |
| 844 | int structIndex = encodeStruct(list.getElement(i)); |
| 845 | setInteger(structIndex, this.listIndicesBuffer, listOffset + 4 * (i + 1)); |
| 846 | } |
| 847 | |
| 848 | return listOffset; |
| 849 | } |
| 850 | |
| 851 | private int setFieldData(byte[] data) |
| 852 | { |
no test coverage detected