Examples of AbstractConverter


Examples of net.sf.joafip.store.service.binary.AbstractConverter

  }

  @Override
  public int readUnsignedShort() throws IOException {
    final int 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

Examples of net.sf.joafip.store.service.binary.AbstractConverter

  }

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

Examples of net.sf.joafip.store.service.binary.AbstractConverter

  }

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

Examples of net.sf.joafip.store.service.binary.AbstractConverter

  }

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

Examples of net.sf.joafip.store.service.binary.AbstractConverter

  }

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

Examples of net.sf.joafip.store.service.binary.AbstractConverter

    while (offset < binaryLength) {
      int byteSize;
      byteSize = helperBinaryConversion.byteSize(binary[offset]);
      if (helperBinaryConversion.getType(binary[offset]) ==
      /**/HelperBinaryConversion.REFERENCE_TYPE) {
        AbstractConverter binaryConverter;
        try {
          binaryConverter = (AbstractConverter) helperBinaryConversion
              .fromBinary(binary, offset);
        } catch (BinaryConverterException exception) {
          throw new ObjectIOException(exception);
View Full Code Here

Examples of net.sf.joafip.store.service.binary.AbstractConverter

   * @throws ObjectIOException
   */
  protected int checkSignature(final byte[] binary,
      final int signatureOffset, final ClassInfo classInfo)
      throws ObjectIOInvalidClassException, ObjectIOException {
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.integerConverter;
      binaryConverter.fromBinary(binary, signatureOffset);
    } catch (BinaryConverterException exception) {
      throw new ObjectIOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new ObjectIOException("signature value must be defined");
View Full Code Here

Examples of net.sf.joafip.store.service.binary.AbstractConverter

   * @throws ObjectIOException
   */
  protected int checkStaticFieldSignature(final byte[] binary,
      final int signatureOffset, final ClassInfo classInfo)
      throws ObjectIOInvalidClassException, ObjectIOException {
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.integerConverter;
      binaryConverter.fromBinary(binary, signatureOffset);
    } catch (BinaryConverterException exception) {
      throw new ObjectIOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new ObjectIOException("signature value must be defined");
View Full Code Here

Examples of net.sf.joafip.store.service.binary.AbstractConverter

    assert arrayTypeInfo.isArrayType() : "must be array type";
    // int offset = super.checkSignature(binary, bodyBeginOffset,
    // arrayTypeInfo, false, false);
    // skip signature
    int offset = bodyBeginOffset + HelperBinaryConversion.INT_BYTE_SIZE;
    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.integerConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new ObjectIOException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new ObjectIOException("array length value must be defined");
View Full Code Here

Examples of net.sf.joafip.store.service.binary.AbstractConverter

    int offset = beginOffset;
    // final int byteSize =
    // helperBinaryConversion.byteSize(recordElementType);
    final int byteSize = recordElementType.getBinarySize();
    for (int index = 0; index < arrayLength; index++) {
      AbstractConverter binaryConverter;
      try {
        binaryConverter = (AbstractConverter) helperBinaryConversion
            .fromBinary(binary, offset, recordElementType);
      } catch (BinaryConverterException exception) {
        throw new ObjectIOException(exception);
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.