⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 binarytest.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of
// the Ozone Library License version 1 published by ozone-db.org.
//
// The original code and portions created by SMB are
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
//

package test.xmldb.levelzero;

import test.xmldb.*;
import junit.framework.*;

import org.xmldb.api.modules.BinaryResource;
/**
 * @author  Per Nyfelt
 */
public class BinaryTest extends XMLDBTestCase implements LevelZeroTestConstants {

    /** Creates new BinaryTest */
    public BinaryTest(String name) {
        super(name);
    }

   /**
     * test all scenarios for using binary data, this is optional for Core Level 1
     */
    public void testBinary() {
        try {
            String id = "LevelZeroTest-img";
            byte[] content = new byte[1];
            insertBinaryContent(id, content);
            retrieveBinaryResource(id);

        } catch (Exception e) {
            fail( e.getMessage( ) );
        }
    }

    private void insertBinaryContent(String id, byte[] content) throws Exception {
    }
   // support for Binary Resource is optional
   private byte[] retrieveBinaryResource(String id) throws Exception {
        throw new Exception("LevelZeroTest.updateSAXDocument() - Not implemented yet");
        //BinaryResource resource = (BinaryResource) col.getResource(id);
        // Return value of getContent must be defined in the specific language mapping
        // for the language used. For Java this is byte[]
        // byte[] img = resource.getContent();
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -