Package java.io

Examples of java.io.NotActiveException


    }

    private void checkState() throws IOException {
        switch (state) {
            case OFF:
                throw new NotActiveException("Object stream not active");
            case ON:
                return;
            case UNREAD_FIELDS:
            case UNREAD_FIELDS_EOB:
                discardReadObject();
View Full Code Here


    }

    public void writeFields() throws IOException {
        final RiverPutField putField = this.putField;
        if (putField == null) {
            throw new NotActiveException("no current PutField object");
        }
        if (! compareAndSetState(UNWRITTEN_FIELDS, ON)) {
            throw new NotActiveException("writeFields() may only be called when the fields have not yet been written");
        }
        this.putField = null;
        putField.write(marshaller);
    }
View Full Code Here

        putField.write(marshaller);
    }

    public PutField putFields() throws IOException {
        if (state == OFF) {
            throw new NotActiveException("No object is currently being serialized");
        }
        if (putField == null) {
            final SerializableField[] serializableFields = serializableClass.getFields();
            final FieldPutter[] fields;
            final String[] names;
View Full Code Here

        }
    }

    public void defaultWriteObject() throws IOException {
        if (! compareAndSetState(UNWRITTEN_FIELDS, ON)) {
            throw new NotActiveException("writeFields() may only be called when the fields have not yet been written");
        }
        try {
            marshaller.doWriteFields(serializableClass, current);
        } finally {
            putField = null;
View Full Code Here

    private void checkState() throws IOException {
        int state = this.state;
        if (state == ON) {
            return;
        } else if (state == OFF) {
            throw new NotActiveException("Object stream not active");
        } else if (state == UNWRITTEN_FIELDS) {
            this.state = ON;
            marshaller.doWriteEmptyFields(serializableClass);
            return;
        } else {
View Full Code Here

    /**
     * @tests java.io.NotActiveException#NotActiveException(java.lang.String)
     */
    public void test_ConstructorLjava_lang_String() {
        String message = "Exception message";
        NotActiveException e = new NotActiveException(message);
        assertSame(message, e.getMessage());
    }
View Full Code Here

  }

  private ObjectClassInfoAndDeclared[] computeCurrentValue()
      throws IOException {
    if (fieldInfoMap == null) {
      throw new NotActiveException("no current PutField object");
    }
    final ClassInfo classInfo = objectAndItsClassInfo.objectClassInfo;
    final FieldInfo[] fieldInfos;
    try {
      fieldInfos = classInfo.getSerialPersistentFieldsInfo();
View Full Code Here

  }

  @Override
  public void registerValidation(final ObjectInputValidation obj,
      final int prio) throws NotActiveException, InvalidObjectException {
    throw new NotActiveException(UNSUPPORTED);
  }
View Full Code Here

  }

  @Override
  public void registerValidation(final ObjectInputValidation obj,
      final int prio) throws NotActiveException, InvalidObjectException {
    throw new NotActiveException(UNSUPPORTED);
  }
View Full Code Here

   */
  @Override
  public void initParameters() {

    try {
      throw new NotActiveException("Not yet implemented");
    } catch (NotActiveException e) {
      e.printStackTrace();
    }
    // TODO this.askForParameter();
  }
View Full Code Here

TOP

Related Classes of java.io.NotActiveException

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.