Package java.io

Examples of java.io.FileNotFoundException.initCause()


      // and attempt to recover by getting the object from another
      // source.
      //
      final FileNotFoundException e;
      e = new FileNotFoundException(id.name());
      e.initCause(parsingError);
      throw e;
    }

    final int type = uol.getType();
    final byte[] raw = uol.getCachedBytes();
View Full Code Here


                throw new IOException( e.getMessage(), e );
            }
            catch ( ResourceDoesNotExistException e )
            {
                FileNotFoundException fnfe = new FileNotFoundException( e.getMessage() );
                fnfe.initCause( e );
                throw fnfe;
            }
        }

        // FIXME remove crappy copy/paste
View Full Code Here

      // and attempt to recover by getting the object from another
      // source.
      //
      final FileNotFoundException e;
      e = new FileNotFoundException(id.name());
      e.initCause(parsingError);
      throw e;
    }

    final int type = uol.getType();
    final byte[] raw = uol.getCachedBytes();
View Full Code Here

    try {
      return repository.getLocalStorage().retrieveItem(repository, new ResourceStoreRequest(path, localOnly));
    }
    catch (ItemNotFoundException e) {
      final FileNotFoundException exception = new FileNotFoundException("Item not found!");
      exception.initCause(e);
      throw exception;
    }
  }

  private void putStorageItem(final String path, final ContentLocator contentLocator)
View Full Code Here

          return item.getInputStream();
        }
        catch (ItemNotFoundException ex) {
          final FileNotFoundException fne = new FileNotFoundException(name + " (remote item not found)");
          fne.initCause(ex);
          throw fne;
        }
      }
    });
View Full Code Here

    }
    catch (NoSuchFileException e) {
      // TODO: "translate" to old FileNotFoundEx as we have existing code relying on this exception
      // Having the new NoSuchFileEx does not buy us much, as two classes are almost identical
      final FileNotFoundException fnf = new FileNotFoundException(e.getMessage());
      fnf.initCause(e);
      throw fnf;
    }
  }

  /**
 
View Full Code Here

      // and attempt to recover by getting the object from another
      // source.
      //
      final FileNotFoundException e;
      e = new FileNotFoundException(id.name());
      e.initCause(parsingError);
      throw e;
    }

    final int type = uol.getType();
    final byte[] raw = uol.getCachedBytes();
View Full Code Here

            return new ByteArrayInputStream(baos.toByteArray());
         }
         catch (IOException ex)
         {
            FileNotFoundException e = new FileNotFoundException("Failed to recompose inflated nested archive " + getName());
            e.initCause(ex);
            throw e;
         }
      }
      else
      {
View Full Code Here

        try {
            repositorySystem.retrieve(repository, file, remoteRelpath, null);
        } catch (ArtifactTransferFailedException cause) {
            IOException e = new FileNotFoundException();
            e.initCause(cause);
            throw e;
        } catch (ArtifactDoesNotExistException cause) {
            IOException e = new FileNotFoundException();
            e.initCause(cause);
            throw e;
View Full Code Here

            IOException e = new FileNotFoundException();
            e.initCause(cause);
            throw e;
        } catch (ArtifactDoesNotExistException cause) {
            IOException e = new FileNotFoundException();
            e.initCause(cause);
            throw e;
        }

        return new FileInputStream(file) {
            @Override
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.