Package org.openstreetmap.osmosis.core

Examples of org.openstreetmap.osmosis.core.OsmosisRuntimeException


      return input.readDouble();
    } catch (EOFException e) {
      throw new EndOfStoreException(
          "End of stream was reached while attempting to read a double from the store.", e);
    } catch (IOException e) {
      throw new OsmosisRuntimeException(
          "Unable to read a double from the store.", e);
    }
  }
View Full Code Here


  private void write(String data) {
    try {
      writer.write(data);
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write data.", e);
    }
  }
View Full Code Here

      return input.readUTF();
    } catch (EOFException e) {
      throw new EndOfStoreException(
          "End of stream was reached while attempting to read a String from the store.", e);
    } catch (IOException e) {
      throw new OsmosisRuntimeException(
          "Unable to read a String from the store.", e);
    }
  }
View Full Code Here

  private void writeNewLine() {
    try {
      writer.newLine();
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to write data.", e);
    }
  }
View Full Code Here

        writer = new BufferedWriter(new OutputStreamWriter(outStream, "UTF-8"));
       
        outStream = null;
       
      } catch (IOException e) {
        throw new OsmosisRuntimeException("Unable to open file " + file + " for writing.", e);
      } finally {
        if (outStream != null) {
          try {
            outStream.close();
          } catch (Exception e) {
View Full Code Here

      if (writer != null) {
        writer.close();
      }
     
    } catch (IOException e) {
      throw new OsmosisRuntimeException("Unable to complete writing to the file " + file + ".", e);
    } finally {
      initialized = false;
      writer = null;
    }
  }
View Full Code Here

  private void waitForUpdate() {
    try {
      dataWaitCondition.await();

    } catch (InterruptedException e) {
      throw new OsmosisRuntimeException("Thread was interrupted.", e);
    }
  }
View Full Code Here

        // update from another thread before checking again.
        waitForUpdate();
      }

      if (!blobResult.isSuccess()) {
        throw new OsmosisRuntimeException("A PBF decoding worker thread failed, aborting.");
      }

      // Send the processed entities to the sink. We can release the lock
      // for the duration of processing to allow worker threads to post
      // their results.
View Full Code Here

        resultSet.getInt("id"),
        resultSet.getString("name")
      );
     
    } catch (SQLException e) {
      throw new OsmosisRuntimeException("Unable to build a user from the current recordset row.", e);
    }
  }
View Full Code Here

      resultSet = null;
     
      return user;
     
    } catch (SQLException e) {
      throw new OsmosisRuntimeException("Query failed for user " + userId + ".");
    } finally {
      if (resultSet != null) {
        try {
          resultSet.close();
        } catch (SQLException e) {
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.OsmosisRuntimeException

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.