| | |
| | | }
|
| | |
|
| | | public void writeElement(Element element) throws IOException {
|
| | | // element.raw
|
| | | if (element == null) return;
|
| | | if (element.getElementType().isComplexElement()) {
|
| | | writeTo(element);
|
| | | ComplexElement complexElement = (ComplexElement) element;
|
| | | for (Element component : complexElement) {
|
| | | writeTo(component);
|
| | | }
|
| | | } else {
|
| | | writeTo(element);
|
| | | }
|
| | | }
|
| | |
|
| | | private void writeTo(Element element) throws IOException {
|
| | | ByteBuffer writeBuffer = ByteBuffer.allocateDirect(element.raw.length * 2);
|
| | | writeBuffer.order(ByteOrder.LITTLE_ENDIAN);
|
| | | for (short word : element.raw) {
|
| | |
| | | channel.write(writeBuffer);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public void toEnd() throws IOException, Dgn7fileException {
|
| | | while (hasNext()) {
|
| | | nextElement();
|