Package com.cedarsoft.serialization

Examples of com.cedarsoft.serialization.NotFoundException


  @Override
  public OutputStream openOutForUpdate(@Nonnull final String id) throws NotFoundException, FileNotFoundException {
    byte[] stored = serialized.get(id);
    if (stored == null) {
      throw new NotFoundException(id);
    }

    return new ByteArrayOutputStream() {
      @Override
      public void close() throws IOException {
View Full Code Here


  @Override
  public void delete(@Nonnull String id) throws NotFoundException {
    byte[] bytes = serialized.remove(id);
    if (bytes == null) {
      throw new NotFoundException("id");
    }
  }
View Full Code Here

  @Override
  public OutputStream openOutForUpdate( @Nonnull String id ) throws NotFoundException, FileNotFoundException {
    File file = getFile( id );
    if ( !file.exists() ) {
      throw new NotFoundException( id );
    }
    return new BufferedOutputStream( new FileOutputStream( file ) );
  }
View Full Code Here

  @Override
  public void delete( @Nonnull String id ) throws NotFoundException {
    File file = getFile( id );
    if ( !file.exists() ) {
      throw new NotFoundException( "No entry found for <" + id + ">" );
    }

    file.delete();
  }
View Full Code Here

  @Override
  public OutputStream openOutForUpdate( @Nonnull final String id ) throws NotFoundException, FileNotFoundException {
    byte[] stored = serialized.get( id );
    if ( stored == null ) {
      throw new NotFoundException( id );
    }

    return new ByteArrayOutputStream() {
      @Override
      public void close() throws IOException {
View Full Code Here

  @Override
  public void delete( @Nonnull String id ) throws NotFoundException {
    byte[] bytes = serialized.remove( id );
    if ( bytes == null ) {
      throw new NotFoundException( "id" );
    }
  }
View Full Code Here

  @Override
  public OutputStream openOutForUpdate( @NotNull @NonNls String id ) throws NotFoundException, FileNotFoundException {
    File file = getFile( id );
    if ( !file.exists() ) {
      throw new NotFoundException( id );
    }
    return new BufferedOutputStream( new FileOutputStream( file ) );
  }
View Full Code Here

  @Override
  public void delete( @NotNull @NonNls String id ) throws NotFoundException {
    File file = getFile( id );
    if ( !file.exists() ) {
      throw new NotFoundException( "No entry found for <" + id + ">" );
    }

    file.delete();
  }
View Full Code Here

  @Override
  public OutputStream openOutForUpdate( @NotNull @NonNls final String id ) throws NotFoundException, FileNotFoundException {
    byte[] stored = serialized.get( id );
    if ( stored == null ) {
      throw new NotFoundException( id );
    }

    return new ByteArrayOutputStream() {
      @Override
      public void close() throws IOException {
View Full Code Here

  @Override
  public void delete( @NotNull @NonNls String id ) throws NotFoundException {
    byte[] bytes = serialized.remove( id );
    if ( bytes == null ) {
      throw new NotFoundException( "id" );
    }
  }
View Full Code Here

TOP

Related Classes of com.cedarsoft.serialization.NotFoundException

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.