aboutsummaryrefslogtreecommitdiffstats
path: root/vdslib/src/main/java/com/yahoo/vdslib/BinaryDocumentList.java
diff options
context:
space:
mode:
Diffstat (limited to 'vdslib/src/main/java/com/yahoo/vdslib/BinaryDocumentList.java')
-rw-r--r--vdslib/src/main/java/com/yahoo/vdslib/BinaryDocumentList.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/vdslib/src/main/java/com/yahoo/vdslib/BinaryDocumentList.java b/vdslib/src/main/java/com/yahoo/vdslib/BinaryDocumentList.java
deleted file mode 100644
index 25b1a6acff4..00000000000
--- a/vdslib/src/main/java/com/yahoo/vdslib/BinaryDocumentList.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vdslib;
-
-import com.yahoo.document.DocumentTypeManager;
-import com.yahoo.vespa.objects.Serializer;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- */
-class BinaryDocumentList extends DocumentList {
-
- private DocumentTypeManager docMan;
- private byte[] buffer;
- private int docCount;
-
- /**
- * Create a new documentlist, using the given buffer.
- *
- * @param buffer buffer containing documents
- */
- BinaryDocumentList(DocumentTypeManager docMan, byte[] buffer) {
- this.docMan = docMan;
- ByteBuffer buf = ByteBuffer.wrap(buffer);
- buf.order(ByteOrder.LITTLE_ENDIAN);
- docCount = buf.getInt();
- this.buffer = buffer;
-
- }
-
- @Override
- public Entry get(int index) throws ArrayIndexOutOfBoundsException {
- if (index < docCount) {
- return Entry.create(docMan, buffer, index);
- } else {
- throw new ArrayIndexOutOfBoundsException(index + " >= " + docCount);
- }
- }
-
- @Override
- public int size() { return docCount; }
-
- @Override
- public int getApproxByteSize() {
- return buffer.length;
- }
-
- @Override
- public void serialize(Serializer buf) {
- buf.put(null, buffer);
- }
-
-}