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

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


    ObjectOutputStream stream = null;
    try {
      stream = new ObjectOutputStream(new BufferedOutputStream(output));
      stream.writeObject(objectAndItsClassInfo.getObject());
    } catch (final InvalidClassException exception) {
      throw new ObjectIOInvalidClassException(exception);
    } catch (final NotSerializableException exception) {
      throw new ObjectIONotSerializableException(
          objectAndItsClassInfo.toString() + " is not serializable",
          exception);
    } catch (final IOException exception) {
View Full Code Here


      zip.setLevel(compressionLevel);
      zip.putNextEntry(ZIP_ENTRY);
      stream = new ObjectOutputStream(zip);
      stream.writeObject(objectAndItsClassInfo.getObject());
    } catch (final InvalidClassException exception) {
      throw new ObjectIOInvalidClassException(exception);
    } catch (final NotSerializableException exception) {
      throw new ObjectIONotSerializableException(
          objectAndItsClassInfo.toString() + " is not serializable",
          exception);
    } catch (final IOException exception) {
View Full Code Here

    } catch (ProxyException exception) {
      final Throwable cause = exception.getCause();
      if (cause instanceof IllegalArgumentException) {
        throw new ObjectIONotSerializableException(exception);
      } else {
        throw new ObjectIOInvalidClassException(FAILED_CREATE_OBJECT
            + " " + classInfo, exception);
      }
    }
    objectAndPersistInfo.setStorageInfo(storageInfo);
    return objectAndPersistInfo;
View Full Code Here

      } catch (ObjectIOInvalidClassException exception) {
        // offset: add int byte size to skip signature
        final String message = badSignatureMessage(
            exception.getMessage(), objectAndPersistInfo, binary,
            offset + HelperBinaryConversion.INT_BYTE_SIZE);
        throw new ObjectIOInvalidClassException(message, exception);
      }
      try {
        setObjectStateImpl(objectAndPersistInfo, binary, localOffset);
      } catch (ObjectIODataRecordNotFoundException exception) {
        throw new ObjectIODataRecordNotFoundException(
View Full Code Here

  private boolean assertLength(
      final ObjectAndPersistInfo objectAndPersistInfo,
      final byte[] binary, final int offset)
      throws ObjectIOInvalidClassException {
    if (offset != binary.length && objectAndPersistInfo.classExists()) {
      throw new ObjectIOInvalidClassException(
          offset
              + " bytes read for "
              + binary.length
              + ", for \""
              + objectAndPersistInfo.toString()
View Full Code Here

              setObjectFieldValueFailureMessage(
                  exception.getMessage(),
                  objectAndPersistInfo, fieldsInfo, index,
                  valuedFieldList), exception);
        } catch (ObjectIOInvalidClassException exception) {// NOPMD
          throw new ObjectIOInvalidClassException(
              setObjectFieldValueFailureMessage(
                  exception.getMessage(),
                  objectAndPersistInfo, fieldsInfo, index,
                  valuedFieldList), exception);
        }
View Full Code Here

      throw exception;
    } catch (ObjectIODataCorruptedException exception) {
      logReadFieldException(fieldInfo, fieldType, exception);
      throw exception;
    } catch (ArrayIndexOutOfBoundsException exception) {
      throw new ObjectIOInvalidClassException("too less bytes in record",
          exception);
    } catch (RuntimeException exception) {
      logReadFieldException(fieldInfo, fieldType, exception);
      throw exception;
    }
View Full Code Here

          fieldValueAndPersistInfo, exception);
      throw new ObjectIOException(exception);
    } catch (ReflectFailedSetException exception) {
      logFatalForSetObjectFieldValue(objectAndPersistInfo,
          fieldValueAndPersistInfo, exception);
      throw new ObjectIOInvalidClassException(exception);
    } catch (AssertionError error) {
      logFatalForSetObjectFieldValue(objectAndPersistInfo,
          fieldValueAndPersistInfo, error);
      throw error;
    }
View Full Code Here

          exception);
      throw new ObjectIOException(exception);
    } catch (ReflectFailedSetException exception) {
      logFatalForSetObjectFieldValue(objectAndItsClassInfo, null,
          exception);
      throw new ObjectIOInvalidClassException(exception);
    }
  }
View Full Code Here

      throw exception;
    } catch (ObjectIODataCorruptedException exception) {
      logReadFieldException(fieldInfo, fieldType, exception);
      throw exception;
    } catch (ArrayIndexOutOfBoundsException exception) {
      throw new ObjectIOInvalidClassException("too less bytes in record",
          exception);
    } catch (RuntimeException exception) {
      logReadFieldException(fieldInfo, fieldType, exception);
      throw exception;
    }
View Full Code Here

TOP

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

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.