1 /*******************************************************************************
2 * Copyright (c) 2016 École Polytechnique de Montréal
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.provisional
.datastore
.core
.serialization
;
13 * Interface for a safe ByteBuffer for writing purposes. This interface allows
14 * only to write data from a buffer, no other operation is allowed on it. The
15 * implementation needs to make sure that the buffer does not write over the
16 * limits of the buffer.
18 * @author Geneviève Bastien
19 * @noimplement This interface is not intended to be implemented by clients.
21 public interface ISafeByteBufferWriter
{
24 * Writes a byte at the buffer's current position
32 * Transfers the bytes from the src array in the buffer at the current
36 * the byte array to write
41 * Writes a char at the buffer's current position
46 void putChar(char value
);
49 * Writes a double at the buffer's current position
54 void putDouble(double value
);
57 * Writes a float at the buffer's current position
62 void putFloat(float value
);
65 * Writes an int at the buffer's current position
70 void putInt(int value
);
73 * Writes a long at the buffer's current position
78 void putLong(long value
);
81 * Writes a short at the buffer's current position
86 void putShort(short value
);
89 * Writes a string value in the byte buffer. The implementation can decide
90 * what format it will use. They can also have a maximum size, in which case
91 * string should be truncated if they are larger than that.
94 * The String value to write to the buffer
96 void putString(String value
);
This page took 0.037522 seconds and 6 git commands to generate.