public class CheckingMappedBytes extends MappedBytes
CHECKING
bytesStore, isPresent, readPosition, writeLimit, writePosition
DEFAULT_BYTE_BUFFER_CAPACITY, MAX_CAPACITY
charToString
Constructor and Description |
---|
CheckingMappedBytes(MappedFile mappedFile) |
Modifier and Type | Method and Description |
---|---|
default void |
parse8bit(Appendable buffer,
StopCharsTester stopCharsTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default void |
parse8bit(Appendable buffer,
StopCharTester stopCharTester)
parse text with ISO-8859-1 decoding as character terminated.
|
default Boolean |
parseBoolean(StopCharTester tester)
Return true or false, or null if it could not be detected
as true or false.
|
default double |
parseDouble()
parse text as a double decimal.
|
default long |
parseLong()
parse text as a long integer.
|
default long |
parseLongDecimal()
Parse the significant digits of a decimal number.
|
default void |
parseUTF(Appendable buffer,
StopCharsTester stopCharsTester)
Deprecated.
|
default void |
parseUTF(Appendable buffer,
StopCharTester stopCharTester)
Deprecated.
|
default String |
parseUTF(StopCharTester stopCharTester)
Deprecated.
|
default void |
parseUtf8(Appendable buffer,
StopCharsTester stopCharsTester)
parse text with UTF-8 decoding as one or two character terminated.
|
default void |
parseUtf8(Appendable buffer,
StopCharTester stopCharTester)
parse text with UTF-8 decoding as character terminated.
|
default String |
parseUtf8(StopCharTester stopCharTester)
parse text with UTF-8 decoding as character terminated.
|
default Reader |
reader()
Access these bytes as an ISO-8859-1 encoded Reader
|
default boolean |
skipTo(StopCharTester tester)
Skip text until a terminating character is reached.
|
protected long |
writeOffsetPositionMoved(long adding) |
Bytes<Void> |
writeOrderedInt(int i) |
Bytes<Void> |
writeOrderedInt(long offset,
int i)
Perform a non stalling write with a store barrier.
|
Bytes<Void> |
writeOrderedLong(long i) |
Bytes<Void> |
writeOrderedLong(long offset,
long i)
Perform a non stalling write with a store barrier.
|
long |
writePosition()
The read position must be readPosition() <= writePosition() && writePosition() <= writeLimit()
|
Bytes<Void> |
writePosition(long position) |
Bytes<Void> |
writeShort(long offset,
short i)
Write a short at an offset.
|
Bytes<Void> |
writeShort(short i16) |
Bytes<Void> |
writeSkip(long bytesToSkip)
Skip a number of bytes by moving the readPosition.
|
Bytes<Void> |
writeSome(ByteBuffer buffer) |
Bytes<Void> |
writeVolatileByte(long offset,
byte i8) |
Bytes<Void> |
writeVolatileInt(long offset,
int i32) |
Bytes<Void> |
writeVolatileLong(long offset,
long i64) |
Bytes<Void> |
writeVolatileShort(long offset,
short i16) |
append8bit, appendUtf8, capacity, copy, isElastic, mappedBytes, mappedBytes, mappedBytes, mappedBytes, mappedFile, performRelease, rawCopy, readCheckOffset, realCapacity, refCount, setNewChunkListener, sharedMemory, start, withSizes, write, write8bit, writeCheckOffset, writeUtf8
address, bytesStore, clear, clearAndPad, compact, compareAndSwapInt, compareAndSwapLong, equals, equalsBytes, hashCode, isPresent, isPresent, lastDecimalPlaces, lastDecimalPlaces, move, nativeRead, nativeRead, nativeWrite, nativeWrite, peekUnsignedByte, prewrite, prewrite, prewriteByte, prewriteInt, prewriteLong, prewriteOffsetPositionMoved, prewriteShort, readByte, readByte, readDouble, readDouble, readFloat, readFloat, readInt, readInt, readLimit, readLimit, readLong, readLong, readOffsetPositionMoved, readPosition, readPosition, readShort, readShort, readSkip, readUnsignedByte, readVolatileInt, readVolatileLong, release, reserve, toString, underlyingObject, write, write, write, write, writeByte, writeByte, writeDouble, writeDouble, writeFloat, writeFloat, writeInt, writeInt, writeLimit, writeLimit, writeLong, writeLong
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
allocateDirect, allocateDirect, allocateElasticDirect, allocateElasticDirect, bytesForRead, copyTo, copyTo, elasticByteBuffer, elasticByteBuffer, elasticByteBuffer, ensureCapacity, expect, expect, from, fromHexString, isClear, isEmpty, isEqual, safeLimit, toHexString, toHexString, toHexString, toString, toString, toString, unchecked, wrapForRead, wrapForRead, wrapForRead, wrapForWrite, wrapForWrite
addAndGetByteNotAtomic, addAndGetDoubleNotAtomic, addAndGetFloatNotAtomic, addAndGetIntNotAtomic, addAndGetLongNotAtomic, addAndGetShortNotAtomic, addAndGetUnsignedByteNotAtomic, addAndGetUnsignedIntNotAtomic, addAndGetUnsignedShortNotAtomic, byteCheckSum, bytesForWrite, charAt, contentEquals, empty, endsWith, equalBytes, inside, isNative, length, longCheckSum, nativePointer, startsWith, startsWith, subSequence, to8bitString, toDebugString, toDebugString, wrap, wrap, wrap, wrap, writeMaxLong, zeroOut
addAndGetDouble, addAndGetFloat, addAndGetInt, addAndGetLong, compareUtf8, copyTo, copyTo, createCharToString, fastHash, findByte, parseLong, printable, read, readBoolean, readIncompleteLong, readUnsignedByte, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8Limited, readUtf8Limited, readVolatileByte, readVolatileDouble, readVolatileFloat, readVolatileInt, readVolatileLong, readVolatileShort, subBytes, toByteArray, toTemporaryDirectByteBuffer
append, write, write, writeBoolean, writeByte, writeInt24, writeOrderedDouble, writeOrderedFloat, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUtf8Limited, writeVolatileDouble, writeVolatileFloat
chars, codePoints
inputStream, parseHexLong, parseUTF, parseUtf8, parseWithLength, read, read, read, read, read8bit, read8bit, read8bit, read8bit, readBoolean, readEnum, readPositionRemaining, readStopBit, readStopBitDouble, readUnsignedInt, readUnsignedInt24, readUnsignedShort, readUtf8, readUtf8, readUTFΔ, readUTFΔ, readWithLength
append, append, append, append, append, append, append, append8bit, append8bit, appendBase, appendDateMillis, appendDecimal, appendTimeMillis, writer
appendUtf8, appendUtf8, appendUtf8, copyFrom, outputStream, write, write, write, write, write8bit, write8bit, write8bit, writeBoolean, writeEnum, writeInt24, writePositionRemaining, writeSome, writeStopBit, writeStopBit, writeUnsignedByte, writeUnsignedInt, writeUnsignedShort, writeUtf8, writeUTFΔ
prepend
public CheckingMappedBytes(MappedFile mappedFile)
protected long writeOffsetPositionMoved(long adding) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeOffsetPositionMoved
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
@NotNull public Bytes<Void> writeOrderedInt(int i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeOrderedInt
in interface StreamingDataOutput<Bytes<Void>>
writeOrderedInt
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
@NotNull public Bytes<Void> writeOrderedInt(long offset, int i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutput
writeOrderedInt
in interface RandomDataOutput<Bytes<Void>>
writeOrderedInt
in class AbstractBytes<Void>
offset
- to write toi
- value to writeBufferOverflowException
- if the capacity was exceededIORuntimeException
- if the underlying buffer fails to resize.net.openhft.chronicle.core.io.IORuntimeException
@NotNull public Bytes<Void> writeOrderedLong(long i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeOrderedLong
in interface StreamingDataOutput<Bytes<Void>>
writeOrderedLong
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
@NotNull public Bytes<Void> writeOrderedLong(long offset, long i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutput
writeOrderedLong
in interface RandomDataOutput<Bytes<Void>>
writeOrderedLong
in class AbstractBytes<Void>
offset
- to write toi
- value to writeBufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public long writePosition()
writePosition
in class AbstractBytes<Void>
public Bytes<Void> writePosition(long position) throws BufferOverflowException
writePosition
in interface StreamingDataOutput<Bytes<Void>>
writePosition
in class AbstractBytes<Void>
BufferOverflowException
@NotNull public Bytes<Void> writeShort(short i16) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeShort
in interface StreamingDataOutput<Bytes<Void>>
writeShort
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
@NotNull public Bytes<Void> writeShort(long offset, short i) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
RandomDataOutput
writeShort
in interface RandomDataOutput<Bytes<Void>>
writeShort
in class AbstractBytes<Void>
offset
- to write toi
- the valueBufferOverflowException
- if the capacity was exceededIORuntimeException
- if the underlying buffer fails to resize.net.openhft.chronicle.core.io.IORuntimeException
public Bytes<Void> writeSkip(long bytesToSkip) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
StreamingDataOutput
writeSkip
in interface StreamingDataOutput<Bytes<Void>>
writeSkip
in class AbstractBytes<Void>
bytesToSkip
- bytes to skip.BufferOverflowException
- if the offset is outside the limits of the BytesIORuntimeException
- if an error occurred trying to obtain the data.net.openhft.chronicle.core.io.IORuntimeException
@NotNull public Bytes<Void> writeSome(@NotNull ByteBuffer buffer) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeSome
in interface StreamingDataOutput<Bytes<Void>>
writeSome
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public Bytes<Void> writeVolatileByte(long offset, byte i8) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileByte
in interface RandomDataOutput<Bytes<Void>>
writeVolatileByte
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public Bytes<Void> writeVolatileInt(long offset, int i32) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileInt
in interface RandomDataOutput<Bytes<Void>>
writeVolatileInt
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public Bytes<Void> writeVolatileLong(long offset, long i64) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileLong
in interface RandomDataOutput<Bytes<Void>>
writeVolatileLong
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public Bytes<Void> writeVolatileShort(long offset, short i16) throws BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
writeVolatileShort
in interface RandomDataOutput<Bytes<Void>>
writeVolatileShort
in class AbstractBytes<Void>
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public Reader reader()
public Boolean parseBoolean(@NotNull StopCharTester tester)
false: f, false, n, no, 0
true: t, true, y, yes, 1
tester
- to detect the end of the text.@NotNull public String parseUtf8(@NotNull StopCharTester stopCharTester)
stopCharTester
- to check if the end has been reached.@Deprecated public String parseUTF(@NotNull StopCharTester stopCharTester)
public void parseUtf8(@NotNull Appendable buffer, @NotNull StopCharTester stopCharTester)
buffer
- to populatestopCharTester
- to check if the end has been reached.@Deprecated public void parseUTF(@NotNull Appendable buffer, @NotNull StopCharTester stopCharTester)
public void parseUtf8(@NotNull Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
@Deprecated public void parseUTF(@NotNull Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public void parse8bit(Appendable buffer, @NotNull StopCharTester stopCharTester) throws BufferUnderflowException, BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
buffer
- to populatestopCharTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public void parse8bit(Appendable buffer, @NotNull StopCharsTester stopCharsTester) throws BufferUnderflowException, BufferOverflowException, net.openhft.chronicle.core.io.IORuntimeException
buffer
- to populatestopCharsTester
- to check if the end has been reached.BufferUnderflowException
BufferOverflowException
net.openhft.chronicle.core.io.IORuntimeException
public long parseLong() throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
public double parseDouble() throws BufferUnderflowException, net.openhft.chronicle.core.io.IORuntimeException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
net.openhft.chronicle.core.io.IORuntimeException
public long parseLongDecimal() throws BufferUnderflowException
The number of decimal places can be retrieved with lastDecimalPlaces()
BufferUnderflowException
public boolean skipTo(@NotNull StopCharTester tester) throws net.openhft.chronicle.core.io.IORuntimeException
tester
- to stop atnet.openhft.chronicle.core.io.IORuntimeException
Copyright © 2016. All rights reserved.