/** * Writes data to the output file. * * @param data * The data to be written. */ public void writeField(int data) { initialize(); try { separateField(); writer.write(Integer.toString(data)); } catch (IOException e) { throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e); } }
/** * Writes data to the output file. * * @param data * The data to be written. */ public void writeField(long data) { initialize(); try { separateField(); writer.write(Long.toString(data)); } catch (IOException e) { throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e); } }
/** * Writes data to the output file. * * @param data * The data to be written. */ public void writeField(Date data) { initialize(); try { separateField(); writer.write(dateFormat.format(data)); } catch (IOException e) { throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e); } }
/** * Writes data to the output file. * * @param data * The data to be written. */ public void writeField(boolean data) { initialize(); try { separateField(); if (data) { writer.write("t"); } else { writer.write("f"); } } catch (IOException e) { throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e); } }
/** * Writes data to the output file. * * @param data * The data to be written. */ public void writeField(String data) { initialize(); try { separateField(); writer.write(escapeString(data)); } catch (IOException e) { throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e); } }
/** * Writes data to the output file. * * @param data * The data to be written. */ public void writeField(Geometry data) { initialize(); try { separateField(); if (data == null) { writer.write(escapeString(null)); } else { writer.write(postgisBinaryWriter.writeHexed(data)); } } catch (IOException e) { throw new OsmosisRuntimeException("Unable to write value (" + data + ")", e); } }