Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.exporter

public Class BibWriter

extends Object
Class Inheritance
Imports
java.io.IOException, .Writer, org.jabref.logic.util.strings.StringUtil

Class to write to a .bib file. Used by BibDatabaseWriter

Field Summary

Modifier and TypeField and Description
private int
private boolean
private final String
private boolean
private boolean
private final Writer

Constructor Summary

AccessConstructor and Description
public
BibWriter(Writer writer, String
the string used for a line break
newLineSeparator
)

Method Summary

Modifier and TypeMethod and Description
public void
finishBlock()

Finishes a block

public void
finishLine()

Finishes a line

public int
public void
write(String string)

Writes the given string.

public void
writeLine(String string)

Writes the given string and finishes it with a line break

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentPositionback to summary
private int currentPosition
lastWriteWasNewlineback to summary
private boolean lastWriteWasNewline
newLineSeparatorback to summary
private final String newLineSeparator
precedingNewLineRequiredback to summary
private boolean precedingNewLineRequired
somethingWasWrittenback to summary
private boolean somethingWasWritten
writerback to summary
private final Writer writer

Constructor Detail

BibWriterback to summary
public BibWriter(Writer writer, String newLineSeparator)
Parameters
newLineSeparator:String

the string used for a line break

Method Detail

finishBlockback to summary
public void finishBlock() throws IOException

Finishes a block

finishLineback to summary
public void finishLine() throws IOException

Finishes a line

getCurrentPositionback to summary
public int getCurrentPosition()
writeback to summary
public void write(String string) throws IOException

Writes the given string. The newlines of the given string are converted to the newline set for this class.

writeLineback to summary
public void writeLine(String string) throws IOException

Writes the given string and finishes it with a line break