mirror of https://github.com/apache/poi.git
[bug-65639] add doc about lack of thread saftey
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fa00e7d472
commit
f454cfa63a
|
@ -91,12 +91,22 @@ public class FontEmbeddedData extends RecordAtom implements FontFacet {
|
|||
out.write(_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwrite the font data. Reading values from this FontEmbeddedData instance while calling setFontData
|
||||
* is not thread safe.
|
||||
* @param fontData new font data
|
||||
*/
|
||||
public void setFontData(byte[] fontData) {
|
||||
fontHeader = null;
|
||||
_data = fontData.clone();
|
||||
LittleEndian.putInt(_header, 4, _data.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the font data. Reading values from this FontEmbeddedData instance while calling {@link #setFontData(byte[])}
|
||||
* is not thread safe.
|
||||
* @return font data
|
||||
*/
|
||||
public FontHeader getFontHeader() {
|
||||
if (fontHeader == null) {
|
||||
FontHeader h = new FontHeader();
|
||||
|
|
Loading…
Reference in New Issue