diff --git a/lib/src/test/org/kiwix/test/libzim/TestBlob.java b/lib/src/test/org/kiwix/test/libzim/TestBlob.java new file mode 100644 index 0000000..afbe604 --- /dev/null +++ b/lib/src/test/org/kiwix/test/libzim/TestBlob.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2022 Matthieu Gautier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.kiwix.test.libzim; + +import org.kiwix.libzim.Blob; + +public class TestBlob +{ + private Blob inner; + TestBlob(Blob _inner) { inner = _inner; } + public byte[] getData() { return inner.getData(); } + public long size() { return inner.size(); } +} diff --git a/lib/src/test/org/kiwix/test/libzim/TestItem.java b/lib/src/test/org/kiwix/test/libzim/TestItem.java index 6928651..790e457 100644 --- a/lib/src/test/org/kiwix/test/libzim/TestItem.java +++ b/lib/src/test/org/kiwix/test/libzim/TestItem.java @@ -20,7 +20,6 @@ package org.kiwix.test.libzim; import org.kiwix.libzim.Item; -import org.kiwix.libzim.Blob; import org.kiwix.libzim.DirectAccessInfo; public class TestItem @@ -31,7 +30,7 @@ public class TestItem public String getPath() { return inner.getPath(); } public String getMimetype() { return inner.getMimetype(); } - public Blob getData() { return inner.getData(); } + public TestBlob getData() { return new TestBlob(inner.getData()); } public long getSize() { return inner.getSize(); } public DirectAccessInfo getDirectAccessInformation() { return inner.getDirectAccessInformation(); }