本文整理汇总了C#中biz.ritter.javapi.append方法的典型用法代码示例。如果您正苦于以下问题:C# biz.ritter.javapi.append方法的具体用法?C# biz.ritter.javapi.append怎么用?C# biz.ritter.javapi.append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biz.ritter.javapi
的用法示例。
在下文中一共展示了biz.ritter.javapi.append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getInternalField
/*
* Gets private field value by reflection.
*
* @param fieldName the field name to be set @param target the object which
* field to be gotten
*
internal static Object getInternalField(String fieldName, Object target) {
Object value = AccessController
.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
Object result = null;
java.lang.reflect.Field field = null;
try {
field = target.getClass().getDeclaredField(
fieldName);
field.setAccessible(true);
result = field.get(target);
} catch (Exception e1) {
return null;
}
return result;
}
});
return value;
}*/
protected internal static bool upTo(String s, ParsePosition position,
java.lang.StringBuffer buffer, char stop)
{
int index = position.getIndex(), length = s.length();
bool lastQuote = false, quote = false;
while (index < length) {
char ch = s.charAt(index++);
if (ch == '\'') {
if (lastQuote) {
buffer.append('\'');
}
quote = !quote;
lastQuote = true;
} else if (ch == stop && !quote) {
position.setIndex(index);
return true;
} else {
lastQuote = false;
buffer.append(ch);
}
}
position.setIndex(index);
return false;
}
示例2: upToWithQuotes
protected internal static bool upToWithQuotes(String s, ParsePosition position,
java.lang.StringBuffer buffer, char stop, char start)
{
int index = position.getIndex(), length = s.length(), count = 1;
bool quote = false;
while (index < length) {
char ch = s.charAt(index++);
if (ch == '\'') {
quote = !quote;
}
if (!quote) {
if (ch == stop) {
count--;
}
if (count == 0) {
position.setIndex(index);
return true;
}
if (ch == start) {
count++;
}
}
buffer.append(ch);
}
// text.07=Unmatched braces in the pattern
throw new java.lang.IllegalArgumentException("Unmatched braces in the pattern"); //$NON-NLS-1$
}
示例3: format
/*
* Private method to format the time
*/
private void format(int date, int digits, java.lang.StringBuilder sb)
{
String str = java.lang.StringJ.valueOf(date);
if (digits - str.length() > 0)
{
sb.append(PADDING.substring(0, digits - str.length()));
}
sb.append(str);
}