Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
Start working on #33
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Mar 21, 2014
1 parent f4527f4 commit c749e0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ public Version version() {
* (should we throw an exception instead?)
*/
@Override
public CsvGenerator useDefaultPrettyPrinter()
{
public CsvGenerator useDefaultPrettyPrinter() {
return this;
}

Expand Down Expand Up @@ -597,8 +596,7 @@ protected final void _verifyValueWrite(String typeMsg)
}

@Override
protected void _releaseBuffers()
{
protected void _releaseBuffers() {
_writer._releaseBuffers();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,10 @@ public void endRow() throws IOException
_lastBuffered = -1;
for (int i = _nextColumnToWrite; i <= last; ++i) {
BufferedValue value = _buffered[i];
if (value == null) { // missing value still needs separator
if (i > 0) {
appendColumnSeparator();
} else {
}
if (value != null) {
_buffered[i] = null;
value.write(this);
}
Expand Down Expand Up @@ -305,7 +306,7 @@ protected void appendValue(String value) throws IOException
_flushBuffer();
}
if (_nextColumnToWrite > 0) {
_outputBuffer[_outputTail++] = _cfgColumnSeparator;
appendColumnSeparator();
}
/* First: determine if we need quotes; simple heuristics;
* only check for short Strings, stop if something found
Expand Down Expand Up @@ -383,14 +384,11 @@ protected void appendValue(boolean value) throws IOException
_outputTail += len;
}

protected void appendColumnSeparator() throws IOException
{
if (_nextColumnToWrite > 0) {
if (_outputTail >= _outputTail) {
_flushBuffer();
}
_outputBuffer[_outputTail++] = _cfgColumnSeparator;
protected void appendColumnSeparator() throws IOException {
if (_outputTail >= _outputTail) {
_flushBuffer();
}
_outputBuffer[_outputTail++] = _cfgColumnSeparator;
}

/*
Expand Down

0 comments on commit c749e0d

Please sign in to comment.