Introduce TestBlob.java

This commit is contained in:
Matthieu Gautier 2023-06-13 17:49:02 +02:00
parent 80f6920201
commit ce1f216108
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2022 Matthieu Gautier <mgautier@kymeria.fr>
*
* 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(); }
}

View File

@ -20,7 +20,6 @@
package org.kiwix.test.libzim; package org.kiwix.test.libzim;
import org.kiwix.libzim.Item; import org.kiwix.libzim.Item;
import org.kiwix.libzim.Blob;
import org.kiwix.libzim.DirectAccessInfo; import org.kiwix.libzim.DirectAccessInfo;
public class TestItem public class TestItem
@ -31,7 +30,7 @@ public class TestItem
public String getPath() { return inner.getPath(); } public String getPath() { return inner.getPath(); }
public String getMimetype() { return inner.getMimetype(); } 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 long getSize() { return inner.getSize(); }
public DirectAccessInfo getDirectAccessInformation() { return inner.getDirectAccessInformation(); } public DirectAccessInfo getDirectAccessInformation() { return inner.getDirectAccessInformation(); }