Package net.sf.joafip.store.service.binary

Examples of net.sf.joafip.store.service.binary.AbstractConverter.fromBinary()


  public void unmarshall(final byte[] binary) throws HeapRecordableException {
    int offset = 0;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.integerConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new HeapRecordableException(
View Full Code Here


    classNameIdentifier = (Integer) binaryConverter.objectFromBinary;
    binaryConverter.objectFromBinary = null;// NOPMD
    offset += HelperBinaryConversion.INT_BYTE_SIZE;
    try {
      binaryConverter = helperBinaryConversion.nullableAndTypedReferenceConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new HeapRecordableException(
View Full Code Here

    } else if (numberRead == data.length) {

      AbstractConverter binaryConverter;
      try {
        binaryConverter = helperBinaryConversion.longConverter;
        binaryConverter.fromBinary(data, 0);
      } catch (final BinaryConverterException exception) {
        throw new ObjectIOException(exception);
      }
      if (!binaryConverter.valueDefinedFromBinary) {
        throw new ObjectIOException(
View Full Code Here

      /* second get data for object length */
      data = new byte[HelperBinaryConversion.INT_BYTE_SIZE];
      readInChangeFileInputStream(changeFileInputStream, data);
      try {
        binaryConverter = helperBinaryConversion.integerConverter;
        binaryConverter.fromBinary(data, 0);
      } catch (final BinaryConverterException exception) {
        throw new ObjectIOException(exception);
      }
      if (!binaryConverter.valueDefinedFromBinary) {
        throw new ObjectIOException("data length value must be defined");
View Full Code Here

  public int read() throws IOException {
    final int byteValue;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.byteConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new IOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new IOException(VALUE_NOT_DEFINED);
View Full Code Here

  public boolean readBoolean() throws IOException {
    final boolean value;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.booleanConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new IOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new IOException(VALUE_NOT_DEFINED);
View Full Code Here

  public byte readByte() throws IOException {
    final byte value;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.byteConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new IOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new IOException(VALUE_NOT_DEFINED);
View Full Code Here

  public int readUnsignedByte() throws IOException {
    final int byteValue;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.byteConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new IOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new IOException(VALUE_NOT_DEFINED);
View Full Code Here

  public char readChar() throws IOException {
    final char value;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.characterConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new IOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new IOException(VALUE_NOT_DEFINED);
View Full Code Here

  public short readShort() throws IOException {
    final short value;
    final AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.shortConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new IOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new IOException(VALUE_NOT_DEFINED);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.