1 /*******************************************************************************
\r
2 * Copyright (c) 2016 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * Semantum Oy - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.databoard.util.binary;
\r
14 import java.io.IOException;
\r
15 import java.nio.ByteBuffer;
\r
18 * A do-nothing stub implementation of RandomAccessBinary.
\r
20 * @author Tuukka Lehtonen
\r
21 * @since 1.22.1 & 1.24.0
\r
23 public class NullRandomAccessBinary implements RandomAccessBinary {
\r
26 public void writeFully(ByteBuffer src) throws IOException {
\r
30 public void writeFully(ByteBuffer src, int length) throws IOException {
\r
34 public void write(int b) throws IOException {
\r
38 public void write(byte[] b) throws IOException {
\r
42 public void write(byte[] b, int off, int len) throws IOException {
\r
46 public void writeBoolean(boolean v) throws IOException {
\r
50 public void writeByte(int v) throws IOException {
\r
54 public void writeShort(int v) throws IOException {
\r
58 public void writeChar(int v) throws IOException {
\r
62 public void writeInt(int v) throws IOException {
\r
66 public void writeLong(long v) throws IOException {
\r
70 public void writeFloat(float v) throws IOException {
\r
74 public void writeDouble(double v) throws IOException {
\r
78 public void writeBytes(String s) throws IOException {
\r
82 public void writeChars(String s) throws IOException {
\r
86 public void writeUTF(String s) throws IOException {
\r
90 public void flush() throws IOException {
\r
94 public long skipBytes(long bytes) throws IOException {
\r
99 public void readFully(ByteBuffer buf) throws IOException {
\r
103 public void readFully(ByteBuffer buf, int length) throws IOException {
\r
107 public long length() throws IOException {
\r
112 public void readFully(byte[] b) throws IOException {
\r
116 public void readFully(byte[] b, int off, int len) throws IOException {
\r
120 public int skipBytes(int n) throws IOException {
\r
125 public boolean readBoolean() throws IOException {
\r
130 public byte readByte() throws IOException {
\r
135 public int readUnsignedByte() throws IOException {
\r
140 public short readShort() throws IOException {
\r
145 public int readUnsignedShort() throws IOException {
\r
150 public char readChar() throws IOException {
\r
155 public int readInt() throws IOException {
\r
160 public long readLong() throws IOException {
\r
165 public float readFloat() throws IOException {
\r
170 public double readDouble() throws IOException {
\r
175 public String readLine() throws IOException {
\r
180 public String readUTF() throws IOException {
\r
185 public void reset() throws IOException {
\r
189 public void removeBytes(long bytes, ByteSide side) throws IOException {
\r
193 public void insertBytes(long bytes, ByteSide side) throws IOException {
\r
197 public void setLength(long newLength) throws IOException {
\r
201 public void close() throws IOException {
\r
205 public boolean isOpen() {
\r
210 public void position(long newPosition) throws IOException {
\r
214 public long position() throws IOException {
\r