code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public void drain(final HttpClient httpClient, final String path, final boolean gzip) {
if (!resendQueue.isEmpty()) {
// queued items are available for retransmission
try {
// drain resend queue until empty or first exception
LOGGER.info("Attempting to retransmit {} requests", resendQueu... | java |
public int flush(final LogSender sender) throws IOException, HttpException {
int numSent = 0;
int maxToSend = queue.size();
if (0 < maxToSend) {
AppIdentity appIdentity = appIdentityService.getAppIdentity();
while (numSent < maxToSend) {
// get the next batch of messages
int batchSize = Math.min... | java |
private String readAndClose(final InputStream stream) throws IOException {
String contents = null;
if (stream != null) {
contents = CharStreams.toString(new InputStreamReader(new BufferedInputStream(stream), "UTF-8"));
stream.close();
}
return contents;
} | java |
public static Properties loadProperties(final String path) {
if (path != null) {
// try as file
try {
File file = new File(path);
if (file.exists()) {
try {
Properties p = new Properties();
... | java |
public static Map<String, String> read(final String path) {
Map<String, String> map = new HashMap<String, String>();
if (path != null) {
try {
Properties p = loadProperties(path);
for (Object key : p.keySet()) {
String value = p.getProp... | java |
public static void sleepQuietly(final long sleepFor, final TimeUnit unit) {
try {
Thread.sleep(unit.toMillis(sleepFor));
} catch (Throwable t) {
// do nothing
}
} | java |
public void activate(final ApiConfiguration apiConfig) {
Preconditions.checkNotNull(apiConfig);
Preconditions.checkNotNull(apiConfig.getApiUrl());
Preconditions.checkArgument(!apiConfig.getApiUrl().isEmpty());
Preconditions.checkNotNull(apiConfig.getApiKey());
Preconditions.checkArgument(!apiConfig.getApiKey(... | java |
public void append(final T event) {
// make sure we can append the log message
if (backgroundService == null) {
return;
}
if (!backgroundService.isRunning()) {
return;
}
// skip internal logging
if (!allowComDotStackify) {
String className = eventAdapter.getClassName(event);
if (cla... | java |
private String buildTemplates() {
String[] templateString = new String[model.getTemplates().size()];
for (int i = 0; i < (model.getTemplates().size()); i++) {
String templateLoaded = loadTemplateFile(
model.getTemplates().get(i));
if (templateLoaded != null) {
templateString[i] = templateLoaded;
}... | java |
private String loadTemplateFile(String templateName) {
String name = templateName.replace('.', '/') + ".java";
InputStream in = SpoonMojoGenerate.class.getClassLoader().getResourceAsStream(name);
String packageName = templateName.substring(0, templateName.lastIndexOf('.'));
String fileName = templateName.substr... | java |
private Element addRoot(Document document,
Map<ReportBuilderImpl.ReportKey, Object> reportsData) {
Element rootElement = document.createElement("project");
if (reportsData.containsKey(ReportKey.PROJECT_NAME)) {
rootElement.setAttribute("name",
(String) reportsData.get(ReportKey.PROJECT_NAME));
}
docu... | java |
private Element addProcessors(Document document, Element root,
Map<ReportBuilderImpl.ReportKey, Object> reportsData) {
if (reportsData.containsKey(ReportKey.PROCESSORS)) {
// Adds root tag "processors".
Element processors = document.createElement("processors");
root.appendChild(processors);
// Adds al... | java |
private Element addElement(Document document, Element parent,
Map<ReportKey, Object> reportsData, ReportKey key, String value) {
if (reportsData.containsKey(key)) {
Element child = document.createElement(key.name().toLowerCase());
child.appendChild(document.createTextNode(value));
parent.appendChild(child... | java |
protected String implode(String[] tabToConcatenate, String pathSeparator) {
final StringBuilder builder = new StringBuilder();
for (int i = 0; i < tabToConcatenate.length; i++) {
builder.append(tabToConcatenate[i]);
if (i < tabToConcatenate.length - 1) {
builder.append(pathSeparator);
}
}
return bu... | java |
public static Uri createUri(Class<? extends Model> type, Long id) {
final StringBuilder uri = new StringBuilder();
uri.append("content://");
uri.append(sAuthority);
uri.append("/");
uri.append(Ollie.getTableName(type).toLowerCase());
if (id != null) {
uri.append("/");
uri.append(id.toString());
}
... | java |
public static <T extends Model> List<T> processCursor(Class<T> cls, Cursor cursor) {
final List<T> entities = new ArrayList<T>();
try {
Constructor<T> entityConstructor = cls.getConstructor();
if (cursor.moveToFirst()) {
do {
T entity = getEntity(cls, cursor.getLong(cursor.getColumnIndex(BaseColumns.... | java |
public static <T extends Model> List<T> processAndCloseCursor(Class<T> cls, Cursor cursor) {
List<T> entities = processCursor(cls, cursor);
cursor.close();
return entities;
} | java |
static synchronized <T extends Model> void load(T entity, Cursor cursor) {
sAdapterHolder.getModelAdapter(entity.getClass()).load(entity, cursor);
} | java |
public List<ClasspathResourceVersion> getResourceVersions() throws URISyntaxException, IOException {
if (!lazyLoadDone) {
if (isClassFolder()) {
logger.debug("\nScanning class folder: " + getUrl());
URI uri = new URI(getUrl());
Path start = Paths.get(... | java |
public CSSStyleSheetImpl merge() {
final CSSStyleSheetImpl merged = new CSSStyleSheetImpl();
final CSSRuleListImpl cssRuleList = new CSSRuleListImpl();
final Iterator<CSSStyleSheetImpl> it = getCSSStyleSheets().iterator();
while (it.hasNext()) {
final CSSStyleSheetImpl cssSty... | java |
public void insertRule(final String rule, final int index) throws DOMException {
try {
final CSSOMParser parser = new CSSOMParser();
parser.setParentStyleSheet(this);
parser.setErrorHandler(ThrowCssExceptionErrorHandler.INSTANCE);
final AbstractCSSRuleImpl r = par... | java |
public void deleteRule(final int index) throws DOMException {
try {
getCssRules().delete(index);
}
catch (final IndexOutOfBoundsException e) {
throw new DOMExceptionImpl(
DOMException.INDEX_SIZE_ERR,
DOMExceptionImpl.INDEX_OUT_OF_BOUNDS,
... | java |
public void setMediaText(final String mediaText) {
try {
final CSSOMParser parser = new CSSOMParser();
final MediaQueryList sml = parser.parseMedia(mediaText);
media_ = new MediaListImpl(sml);
}
catch (final IOException e) {
// TODO handle exceptio... | java |
protected Locator createLocator(final Token t) {
return new Locator(getInputSource().getURI(),
t == null ? 0 : t.beginLine,
t == null ? 0 : t.beginColumn);
} | java |
protected String addEscapes(final String str) {
final StringBuilder sb = new StringBuilder();
char ch;
for (int i = 0; i < str.length(); i++) {
ch = str.charAt(i);
switch (ch) {
case 0 :
continue;
case '\b':
... | java |
public MediaQueryList parseMedia(final InputSource source) throws IOException {
source_ = source;
ReInit(getCharStream(source));
final MediaQueryList ml = new MediaQueryList();
try {
mediaList(ml);
}
catch (final ParseException e) {
getErrorHandler... | java |
protected void handleImportStyle(final String uri, final MediaQueryList media,
final String defaultNamespaceURI, final Locator locator) {
getDocumentHandler().importStyle(uri, media, defaultNamespaceURI, locator);
} | java |
protected void handleStartPage(final String name, final String pseudoPage, final Locator locator) {
getDocumentHandler().startPage(name, pseudoPage, locator);
} | java |
protected void handleProperty(final String name, final LexicalUnit value,
final boolean important, final Locator locator) {
getDocumentHandler().property(name, value, important, locator);
} | java |
protected LexicalUnit functionInternal(final LexicalUnit prev, final String funct,
final LexicalUnit params) {
if ("counter(".equalsIgnoreCase(funct)) {
return LexicalUnitImpl.createCounter(prev, params);
}
else if ("counters(".equalsIgnoreCase(funct)) {
retu... | java |
protected LexicalUnit hexcolorInternal(final LexicalUnit prev, final Token t) {
// Step past the hash at the beginning
final int i = 1;
int r = 0;
int g = 0;
int b = 0;
final int len = t.image.length() - 1;
try {
if (len == 3) {
r = Int... | java |
protected int intValue(final char op, final String s) {
final int result = Integer.parseInt(s);
if (op == '-') {
return -1 * result;
}
return result;
} | java |
protected double doubleValue(final char op, final String s) {
final double result = Double.parseDouble(s);
if (op == '-') {
return -1 * result;
}
return result;
} | java |
protected int getLastNumPos(final String s) {
int i = 0;
for ( ; i < s.length(); i++) {
if (NUM_CHARS.indexOf(s.charAt(i)) < 0) {
break;
}
}
return i - 1;
} | java |
public static void sortByNumberOfVersionsDesc(List<ClasspathResource> resources) {
// sort by number of version occurrences
Comparator<ClasspathResource> sortByNumberOfVersionsDesc = new Comparator<ClasspathResource>() {
@Override
public int compare(ClasspathResource resource1, C... | java |
public static List<ClasspathResource> findResourcesWithDuplicates(List<ClasspathResource> resourceFiles, boolean excludeSameSizeDups) {
List<ClasspathResource> resourcesWithDuplicates = new ArrayList<>();
// keep only entries with duplicates
for (ClasspathResource resource : resourceFiles) {
... | java |
public void setMediaText(final String mediaText) throws DOMException {
try {
final CSSOMParser parser = new CSSOMParser();
parser.setErrorHandler(ThrowCssExceptionErrorHandler.INSTANCE);
final MediaQueryList sml = parser.parseMedia(mediaText);
setMediaList(sml);
... | java |
public void setMedia(final List<String> media) {
mediaQueries_.clear();
for (String medium : media) {
mediaQueries_.add(new MediaQuery(medium));
}
} | java |
public CSSStyleSheetImpl parseStyleSheet(final InputSource source, final String href) throws IOException {
final CSSOMHandler handler = new CSSOMHandler();
handler.setHref(href);
parser_.setDocumentHandler(handler);
parser_.parseStyleSheet(source);
final Object o = handler.getRoo... | java |
public CSSValueImpl parsePropertyValue(final String propertyValue) throws IOException {
try (InputSource source = new InputSource(new StringReader(propertyValue))) {
final CSSOMHandler handler = new CSSOMHandler();
parser_.setDocumentHandler(handler);
final LexicalUnit lu = p... | java |
public AbstractCSSRuleImpl parseRule(final String rule) throws IOException {
try (InputSource source = new InputSource(new StringReader(rule))) {
final CSSOMHandler handler = new CSSOMHandler();
parser_.setDocumentHandler(handler);
parser_.parseRule(source);
retur... | java |
public SelectorList parseSelectors(final String selectors) throws IOException {
try (InputSource source = new InputSource(new StringReader(selectors))) {
final HandlerBase handler = new HandlerBase();
parser_.setDocumentHandler(handler);
return parser_.parseSelectors(source);... | java |
public MediaQueryList parseMedia(final String media) throws IOException {
try (InputSource source = new InputSource(new StringReader(media))) {
final HandlerBase handler = new HandlerBase();
parser_.setDocumentHandler(handler);
if (parser_ instanceof AbstractCSSParser) {
... | java |
public String removeProperty(final String propertyName) throws DOMException {
if (null == propertyName) {
return "";
}
for (int i = 0; i < properties_.size(); i++) {
final Property p = properties_.get(i);
if (p != null && propertyName.equalsIgnoreCase(p.getNam... | java |
public void insertRule(final String rule, final int index) throws DOMException {
final CSSStyleSheetImpl parentStyleSheet = getParentStyleSheet();
try {
final CSSOMParser parser = new CSSOMParser();
parser.setParentStyleSheet(parentStyleSheet);
parser.setErrorHandler... | java |
public static String trimBy(final StringBuilder s, final int left, final int right) {
return s.substring(left, s.length() - right);
} | java |
@Override
public String getMessage() {
if (message_ != null) {
return message_;
}
if (getCause() != null) {
return getCause().getMessage();
}
switch (code_) {
case UNSPECIFIED_ERR:
return "unknown error";
case ... | java |
public void addCondition(final Condition condition) {
if (conditions_ == null) {
conditions_ = new ArrayList<>();
}
conditions_.add(condition);
} | java |
public void setSelectorText(final String selectorText) throws DOMException {
try {
final CSSOMParser parser = new CSSOMParser();
selectors_ = parser.parseSelectors(selectorText);
}
catch (final CSSException e) {
throw new DOMExceptionImpl(
DOME... | java |
public static void setDebugAll (final boolean bDebug)
{
setDebugText (bDebug);
setDebugFont (bDebug);
setDebugSplit (bDebug);
setDebugPrepare (bDebug);
setDebugRender (bDebug);
} | java |
public Version withPreRelease(String newPreRelease) {
require(newPreRelease != null, "newPreRelease is null");
final String[] newPreReleaseParts = parsePreRelease(newPreRelease);
return new Version(this.major, this.minor, this.patch, newPreReleaseParts,
this.buildMetaDataParts);
... | java |
public Version withBuildMetaData(String newBuildMetaData) {
require(newBuildMetaData != null, "newBuildMetaData is null");
final String[] newBuildMdParts = parseBuildMd(newBuildMetaData);
return new Version(this.major, this.minor, this.patch, this.preReleaseParts,
newBuildMdParts... | java |
public Version nextPreRelease() {
final String[] newPreReleaseParts = incrementIdentifier(this.preReleaseParts);
return new Version(this.major, this.minor, this.patch, newPreReleaseParts,
EMPTY_ARRAY);
} | java |
public Version nextBuildMetaData() {
final String[] newBuildMetaData = incrementIdentifier(this.buildMetaDataParts);
return new Version(this.major, this.minor, this.patch, this.preReleaseParts,
newBuildMetaData);
} | java |
private static int isNumeric(String s) {
final char[] chars = s.toCharArray();
int num = 0;
// note: this method does not account for leading zeroes as could occur in build
// meta data parts. Leading zeroes are thus simply ignored when parsing the
// number.
for (int i ... | java |
public String[] getPreReleaseParts() {
if (this.preReleaseParts.length == 0) {
return EMPTY_ARRAY;
}
return Arrays.copyOf(this.preReleaseParts, this.preReleaseParts.length);
} | java |
public String[] getBuildMetaDataParts() {
if (this.buildMetaDataParts.length == 0) {
return EMPTY_ARRAY;
}
return Arrays.copyOf(this.buildMetaDataParts, this.buildMetaDataParts.length);
} | java |
public Version toUpperCase() {
return new Version(this.major, this.minor, this.patch,
copyCase(this.preReleaseParts, true),
copyCase(this.buildMetaDataParts, true));
} | java |
public Version toLowerCase() {
return new Version(this.major, this.minor, this.patch,
copyCase(this.preReleaseParts, false),
copyCase(this.buildMetaDataParts, false));
} | java |
private Object readResolve() throws ObjectStreamException {
if (this.preRelease != null || this.buildMetaData != null) {
return createInternal(this.major, this.minor, this.patch,
this.preRelease,
this.buildMetaData);
}
return this;
} | java |
public static void avoidDoubleBorders (@Nonnull final PLTable ret)
{
boolean bPreviousRowHasBottomBorder = false;
for (int i = 0; i < ret.getRowCount (); i++)
{
boolean bRowHasBottomBorder = true;
boolean bRowHasTopBorder = true;
final PLTableRow aRow = ret.getRowAtIndex (i);
for (... | java |
@Nonnull
public FontSpec getCloneWithDifferentFont (@Nonnull final PreloadFont aNewFont)
{
ValueEnforcer.notNull (aNewFont, "NewFont");
if (aNewFont.equals (m_aPreloadFont))
return this;
// Don't copy loaded font!
return new FontSpec (aNewFont, m_fFontSize, m_aColor);
} | java |
@Nonnull
public FontSpec getCloneWithDifferentFontSize (final float fNewFontSize)
{
ValueEnforcer.isGT0 (fNewFontSize, "FontSize");
if (EqualsHelper.equals (fNewFontSize, m_fFontSize))
return this;
return new FontSpec (m_aPreloadFont, fNewFontSize, m_aColor);
} | java |
@Nonnull
public FontSpec getCloneWithDifferentColor (@Nonnull final Color aNewColor)
{
ValueEnforcer.notNull (aNewColor, "NewColor");
if (aNewColor.equals (m_aColor))
return this;
return new FontSpec (m_aPreloadFont, m_fFontSize, aNewColor);
} | java |
@Nonnegative
public float getEffectiveValue (final float fAvailableHeight)
{
switch (m_eType)
{
case ABSOLUTE:
return Math.min (m_fValue, fAvailableHeight);
case PERCENTAGE:
return fAvailableHeight * m_fValue / 100;
default:
throw new IllegalStateException ("Unsuppo... | java |
@Nonnull
public static HeightSpec abs (@Nonnegative final float fValue)
{
ValueEnforcer.isGT0 (fValue, "Value");
return new HeightSpec (EValueUOMType.ABSOLUTE, fValue);
} | java |
@Nonnull
public static HeightSpec perc (@Nonnegative final float fPerc)
{
ValueEnforcer.isGT0 (fPerc, "Perc");
return new HeightSpec (EValueUOMType.PERCENTAGE, fPerc);
} | java |
@Nonnull
@ReturnsMutableCopy
public static PLTable createWithPercentage (@Nonnull @Nonempty final float... aPercentages)
{
ValueEnforcer.notEmpty (aPercentages, "Percentages");
final ICommonsList <WidthSpec> aWidths = new CommonsArrayList <> (aPercentages.length);
for (final float fPercentage : aPerc... | java |
@Nonnull
@ReturnsMutableCopy
public static PLTable createWithEvenlySizedColumns (@Nonnegative final int nColumnCount)
{
ValueEnforcer.isGT0 (nColumnCount, "ColumnCount");
final ICommonsList <WidthSpec> aWidths = new CommonsArrayList <> (nColumnCount);
for (int i = 0; i < nColumnCount; ++i)
aWid... | java |
private void _setPreparedSize (@Nonnull final SizeSpec aPreparedSize)
{
ValueEnforcer.notNull (aPreparedSize, "PreparedSize");
m_bPrepared = true;
m_aPreparedSize = aPreparedSize;
m_aRenderSize = getRenderSize (aPreparedSize);
if (PLDebugLog.isDebugPrepare ())
{
String sSuffix = "";
... | java |
@Nonnull
protected final IMPLTYPE internalMarkAsPrepared (@Nonnull final SizeSpec aPreparedSize)
{
// Prepare only once!
internalCheckNotPrepared ();
_setPreparedSize (aPreparedSize);
return thisAsT ();
} | java |
public void setFont (final PDFont font, final float fontSize) throws IOException
{
if (fontStack.isEmpty ())
fontStack.add (font);
else
fontStack.set (fontStack.size () - 1, font);
PDDocumentHelper.handleFontSubset (m_aDoc, font);
writeOperand (resources.add (font));
writeOperand (fo... | java |
public void showText (final String text) throws IOException
{
if (!inTextMode)
{
throw new IllegalStateException ("Must call beginText() before showText()");
}
if (fontStack.isEmpty ())
{
throw new IllegalStateException ("Must call setFont() before showText()");
}
final PDFon... | java |
public void setTextMatrix (final Matrix matrix) throws IOException
{
if (!inTextMode)
{
throw new IllegalStateException ("Error: must call beginText() before setTextMatrix");
}
writeAffineTransform (matrix.createAffineTransform ());
writeOperator ((byte) 'T', (byte) 'm');
} | java |
public void drawImage (final PDImageXObject image, final float x, final float y) throws IOException
{
drawImage (image, x, y, image.getWidth (), image.getHeight ());
} | java |
public void drawImage (final PDImageXObject image,
final float x,
final float y,
final float width,
final float height) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: draw... | java |
public void drawImage (final PDInlineImage inlineImage, final float x, final float y) throws IOException
{
drawImage (inlineImage, x, y, inlineImage.getWidth (), inlineImage.getHeight ());
} | java |
public void drawImage (final PDInlineImage inlineImage,
final float x,
final float y,
final float width,
final float height) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error:... | java |
public void drawForm (final PDFormXObject form) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: drawForm is not allowed within a text block.");
}
writeOperand (resources.add (form));
writeOperator ((byte) 'D', (byte) 'o');
} | java |
public void saveGraphicsState () throws IOException
{
if (!fontStack.isEmpty ())
{
fontStack.push (fontStack.peek ());
}
if (!strokingColorSpaceStack.isEmpty ())
{
strokingColorSpaceStack.push (strokingColorSpaceStack.peek ());
}
if (!nonStrokingColorSpaceStack.isEmpty ())
... | java |
public void restoreGraphicsState () throws IOException
{
if (!fontStack.isEmpty ())
{
fontStack.pop ();
}
if (!strokingColorSpaceStack.isEmpty ())
{
strokingColorSpaceStack.pop ();
}
if (!nonStrokingColorSpaceStack.isEmpty ())
{
nonStrokingColorSpaceStack.pop ();
... | java |
public void setStrokingColor (final double g) throws IOException
{
if (_isOutsideOneInterval (g))
{
throw new IllegalArgumentException ("Parameter must be within 0..1, but is " + g);
}
writeOperand ((float) g);
writeOperator ((byte) 'G');
} | java |
public void setNonStrokingColor (final PDColor color) throws IOException
{
if (nonStrokingColorSpaceStack.isEmpty () || nonStrokingColorSpaceStack.peek () != color.getColorSpace ())
{
writeOperand (getName (color.getColorSpace ()));
writeOperator ((byte) 'c', (byte) 's');
if (nonStrokingCol... | java |
public void setNonStrokingColor (final Color color) throws IOException
{
final float [] components = new float [] { color.getRed () / 255f,
color.getGreen () / 255f,
color.getBlue () / 255f };
final PDColor pdColor =... | java |
public void setNonStrokingColor (final int r, final int g, final int b) throws IOException
{
if (_isOutside255Interval (r) || _isOutside255Interval (g) || _isOutside255Interval (b))
{
throw new IllegalArgumentException ("Parameters must be within 0..255, but are (" + r + "," + g + "," + b + ")");
}
... | java |
public void setNonStrokingColor (final int c, final int m, final int y, final int k) throws IOException
{
if (_isOutside255Interval (c) ||
_isOutside255Interval (m) ||
_isOutside255Interval (y) ||
_isOutside255Interval (k))
{
throw new IllegalArgumentException ("Parameters must b... | java |
public void setNonStrokingColor (final double c, final double m, final double y, final double k) throws IOException
{
if (_isOutsideOneInterval (c) ||
_isOutsideOneInterval (m) ||
_isOutsideOneInterval (y) ||
_isOutsideOneInterval (k))
{
throw new IllegalArgumentException ("Param... | java |
public void setNonStrokingColor (final double g) throws IOException
{
if (_isOutsideOneInterval (g))
{
throw new IllegalArgumentException ("Parameter must be within 0..1, but is " + g);
}
writeOperand ((float) g);
writeOperator ((byte) 'g');
} | java |
public void addRect (final float x, final float y, final float width, final float height) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: addRect is not allowed within a text block.");
}
writeOperand (x);
writeOperand (y);
writeOperand (width);
writeOp... | java |
public void moveTo (final float x, final float y) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: moveTo is not allowed within a text block.");
}
writeOperand (x);
writeOperand (y);
writeOperator ((byte) 'm');
} | java |
public void lineTo (final float x, final float y) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: lineTo is not allowed within a text block.");
}
writeOperand (x);
writeOperand (y);
writeOperator ((byte) 'l');
} | java |
public void shadingFill (final PDShading shading) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: shadingFill is not allowed within a text block.");
}
writeOperand (resources.add (shading));
writeOperator ((byte) 's', (byte) 'h');
} | java |
public void setLineJoinStyle (final int lineJoinStyle) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: setLineJoinStyle is not allowed within a text block.");
}
if (lineJoinStyle >= 0 && lineJoinStyle <= 2)
{
writeOperand (lineJoinStyle);
writeOper... | java |
public void setLineCapStyle (final int lineCapStyle) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: setLineCapStyle is not allowed within a text block.");
}
if (lineCapStyle >= 0 && lineCapStyle <= 2)
{
writeOperand (lineCapStyle);
writeOperator (... | java |
public void setLineDashPattern (final float [] pattern, final float phase) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: setLineDashPattern is not allowed within a text block.");
}
write ((byte) '[');
for (final float value : pattern)
{
writeOperan... | java |
public void beginMarkedContent (final COSName tag, final PDPropertyList propertyList) throws IOException
{
writeOperand (tag);
writeOperand (resources.add (propertyList));
writeOperator ((byte) 'B', (byte) 'D', (byte) 'C');
} | java |
protected void writeOperand (final float real) throws IOException
{
final int byteCount = NumberFormatUtil.formatFloatFast (real,
formatDecimal.getMaximumFractionDigits (),
formatBuffer);
i... | java |
private void writeAffineTransform (final AffineTransform transform) throws IOException
{
final double [] values = new double [6];
transform.getMatrix (values);
for (final double v : values)
{
writeOperand ((float) v);
}
} | java |
public void addPageSet (@Nonnull final PLPageSet aPageSet)
{
ValueEnforcer.notNull (aPageSet, "PageSet");
m_aPageSets.add (aPageSet);
} | java |
void setHeaderHeight (final float fHeaderHeight)
{
// Set the maximum value only
if (Float.isNaN (m_fHeaderHeight))
m_fHeaderHeight = fHeaderHeight;
else
m_fHeaderHeight = Math.max (m_fHeaderHeight, fHeaderHeight);
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.