📄 bloboutputstream.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-2000 by SMB GmbH. All rights reserved.//// $Id: BLOBOutputStream.java,v 1.3 2000/10/28 16:55:16 daniela Exp $package org.ozoneDB.blob;import org.ozoneDB.*;import java.io.*;/** * The output stream of ozone BLOBs. Every write operations will call * the underlaying BLOBContainer. Therefore BLOBStreams should never be used * without buffering/caching. This can be done by using the BLOBStream together * with a BufferedStream. * * * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.3 $Date: 2000/10/28 16:55:16 $ */public class BLOBOutputStream extends OutputStream implements Serializable { BLOBContainer container; int index = 0; public BLOBOutputStream( BLOBContainer _container ) { container = _container; } public void write( byte[] b ) throws IOException { write( b, 0, b.length ); } public void write( byte[] b, int off, int len ) throws IOException { try { container.write( index, b, off, len ); index += len; } catch (Exception e) { e.printStackTrace(); throw new IOException( e.getMessage() ); } } public void write( int b ) throws IOException { byte[] bb = new byte[1]; bb[0] = (byte)b; write( bb, 0, 1 ); } public void flush() throws IOException { } public void close() throws IOException { } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -