Package net.sf.joafip.store.service.objectio

Examples of net.sf.joafip.store.service.objectio.ObjectIOException


        AbstractConverter binaryConverter;
        try {
          binaryConverter = helperBinaryConversion.fromBinary(binary,
              offset, fieldType);
        } catch (BinaryConverterException exception) {
          throw new ObjectIOException(exception);
        }
        final Object fieldValue = binaryConverter.objectFromBinary;
        binaryConverter.objectFromBinary = null;// NOPMD
        try {
          final ObjectAndPersistInfo fieldAndPersistInfo = objectIOManager
              .createObjectPersistInfoOfObject(
                  fieldValue,
                  Boolean.FALSE,
                  fieldValue == null ? ClassInfo.NULL
                      : classInfoFactory
                          .getNoProxyClassInfo(fieldValue
                              .getClass()), false);

          fieldValueClassInfoAndDeclared = new ObjectClassInfoAndDeclared(
              fieldAndPersistInfo, fieldType);
        } catch (ClassInfoException exception) {
          throw new ObjectIOException(exception);
        }
        offset += fieldType.getBinarySize();
      } else {
        final ObjectAndPersistInfo fromReference = referenceInput
            .fromBinary(binary, offset);
View Full Code Here


      } else if (ObjectIONotSerializableException.class
          .equals(causeOfCauseOfCause)) {
        throw (ObjectIONotSerializableException) causeOfCauseOfCause;
      } else if (!ObjectIODataCorruptedException.class
          .equals(causeOfCauseOfCause)) {
        throw new ObjectIOException(causeOfCause);
      }
    } else {
      throw new ObjectIOException(causeOfCause);
    }
  }
View Full Code Here

      ObjectIODataCorruptedException, ObjectIONotSerializableException {
    final Throwable causeOfCause = cause.getCause();
    if (IOException.class.equals(causeOfCause)) {
      throwIOExceptionCause(causeOfCause);
    } else {
      throw new ObjectIOException(exception);
    }
  }
View Full Code Here

    } else if (ObjectIODataCorruptedException.class.equals(cause)) {
      throw (ObjectIODataCorruptedException) cause;
    } else if (ObjectIONotSerializableException.class.equals(cause)) {
      throw (ObjectIONotSerializableException) cause;
    } else {
      throw new ObjectIOException(throwable);
    }
  }
View Full Code Here

    try {
      setSpecificObjectIO(
          classInfoFactory.getNoProxyClassInfo(String.class),
          objectInputForString, objectOutputForString);
    } catch (final ClassInfoException exception) {
      throw new ObjectIOException(exception);
    }
    this.headerWriter = new HeaderWriter(currentDataModelIdentifier,
        classNameManager, helperBinaryConversion);
    this.headerReader = new HeaderReader(classNameManager,
        helperBinaryConversion);
View Full Code Here

          enumObjectInput = classInfo.getObjectInput();
        } else {
          enumObjectInput = classInfo.getLazyObjectInput();
        }
      } catch (final ClassInfoException exception) {
        throw new ObjectIOException(exception);
      }
      // ASSERTX
      assert !EnumObjectInput.OBJECT_INPUT_SPECIFIC
          .equals(enumObjectInput) : "no default object io for specific io";
      objectInput = objectInputs[enumObjectInput.ordinal()];
View Full Code Here

    } else {
      final EnumObjectOutput enumObjectOutput;
      try {
        enumObjectOutput = classInfo.getObjectOutput();
      } catch (final ClassInfoException exception) {
        throw new ObjectIOException(exception);
      }
      assert assertNotSpecificObjectOutput(enumObjectOutput);
      objectOutput = objectOutputs[enumObjectOutput.ordinal()];
    }
    return objectOutput;
View Full Code Here

  }

  private boolean assertNotSpecificObjectOutput(
      final EnumObjectOutput enumObjectOutput) throws ObjectIOException {
    if (EnumObjectOutput.OBJECT_OUTPUT_SPECIFIC.equals(enumObjectOutput)) {
      throw new ObjectIOException("no default object io for specific io");
    }
    return true;
  }
View Full Code Here

      final Object substituteObject;
      try {
        substituteObject = helperReflect
            .newInstanceDefaultConstructor(substituteClass);
      } catch (final ReflectException exception) {
        throw new ObjectIOException(exception);
      }
      final ISubsituteSynchronizer synchronizer = classInfo
          .getSubsituteSynchronizer();
      synchronizer.synchronizeSubstitute(
          objectAndPersistInfo.getObject(), substituteObject);
View Full Code Here

      } else if (replacementClassInfo.isKnownAsNotExisting()) {
        try {
          objectAndPersistInfo = new ObjectAndPersistInfo(null,
              false, replacementClassInfo, storageInfo);
        } catch (final ClassInfoException exception) {
          throw new ObjectIOException(exception);
        }
      } else {
        throw new ObjectIOClassNotFoundException(
            "class does not exist: may be need to be declared \"known as not exist\"\n"
                + replacementClassInfo.toString());
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.objectio.ObjectIOException

Copyright © 2018 www.massapicom. 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.