1 /*******************************************************************************
2 * Copyright (c) 2010 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.databoard.util.binary;
14 import java.io.DataOutput;
15 import java.io.IOException;
16 import java.nio.ByteBuffer;
21 * Common interface for ByteBuffer, byte[], OutputStream, RandomAccessFile.
23 * @see ByteBufferWriteable
24 * @see OutputStreamWriteable
25 * @author Toni Kalajainen (toni.kalajainen@vtt.fi)
27 public interface BinaryWriteable extends DataOutput {
30 * Put n bytes from the remaining of the byte array.
31 * This operation moves the pointer in byte buffer.
36 void writeFully(ByteBuffer src) throws IOException;
39 * Put n bytes from the remaining of the byte buffer.
40 * This operation moves the pointer in byte buffer.
46 void writeFully(ByteBuffer src, int length) throws IOException;