项目:AndroidApktool
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
*
* @param length
*/
public void forward(int length) {
if (this.pointer + length + 1 >= this.buffer.length()) {
update();
}
char ch = 0;
for (int i = 0; i < length; i++) {
ch = this.buffer.charat(this.pointer);
this.pointer++;
this.index++;
if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (ch != '\uFEFF') {
this.column++;
}
}
}
项目:5zig-TIMV-Plugin
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
* if the last character is high surrogate one more character will be read
*
* @param length amount of characters to move forward
*/
public void forward(int length) {
int c;
for (int i = 0; i < length; i++) {
if (this.pointer == this.buffer.length()) {
update();
}
if (this.pointer == this.buffer.length()) {
break;
}
c = this.buffer.codePointAt(this.pointer);
this.pointer += Character.charCount(c);
this.index += Character.charCount(c);
if (Constant.LINEBR.has(c) || (c == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (c != 0xFEFF) {
this.column++;
}
}
if (this.pointer == this.buffer.length()) {
update();
}
}
项目:snake-yaml
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
*
* @param length
*/
public void forward(int length) {
if (this.pointer + length + 1 >= this.buffer.length()) {
update();
}
char ch = 0;
for (int i = 0; i < length; i++) {
ch = this.buffer.charat(this.pointer);
this.pointer++;
this.index++;
if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (ch != '\uFEFF') {
this.column++;
}
}
}
项目:SubServers-2
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
* if the last character is high surrogate one more character will be read
*
* @param length amount of characters to move forward
*/
public void forward(int length) {
int c;
for (int i = 0; i < length; i++) {
if (this.pointer == this.buffer.length()) {
update();
}
if (this.pointer == this.buffer.length()) {
break;
}
c = this.buffer.codePointAt(this.pointer);
this.pointer += Character.charCount(c);
this.index += Character.charCount(c);
if (Constant.LINEBR.has(c) || (c == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (c != 0xFEFF) {
this.column++;
}
}
if (this.pointer == this.buffer.length()) {
update();
}
}
private String determineBlockHints(String text)
{
StringBuilder hints = new StringBuilder();
// if (Constant.LINEBR.has(text.charat(0)," ")) disabled,always add indent marker to prevent formatting problems.
{
hints.append(this.bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1))
{
hints.append("-");
}
else if ((text.length() == 1) || Constant.LINEBR.has(text.charat(text.length() - 2)))
{
hints.append("+");
}
return hints.toString();
}
项目:snakeyaml
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
*
* @param length
*/
public void forward(int length) {
if (this.pointer + length + 1 >= this.buffer.length()) {
update();
}
char ch = 0;
for (int i = 0; i < length; i++) {
ch = this.buffer.charat(this.pointer);
this.pointer++;
this.index++;
if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (ch != '\uFEFF') {
this.column++;
}
}
}
项目:TestTheTeacher
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
*
* @param length
*/
public void forward(int length) {
if (this.pointer + length + 1 >= this.buffer.length()) {
update();
}
char ch = 0;
for (int i = 0; i < length; i++) {
ch = this.buffer.charat(this.pointer);
this.pointer++;
this.index++;
if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (ch != '\uFEFF') {
this.column++;
}
}
}
项目:org.openntf.domino
文件:StreamReader.java
/**
* read the next length characters and move the pointer.
*
*/
public void forward(final int length) {
if (this.pointer + length + 1 >= this.buffer.length()) {
update();
}
char ch = 0;
for (int i = 0; i < length; i++) {
ch = this.buffer.charat(this.pointer);
this.pointer++;
this.index++;
if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charat(pointer) != '\n')) {
this.line++;
this.column = 0;
} else if (ch != '\uFEFF') {
this.column++;
}
}
}
项目:AndroidApktool
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:5zig-TIMV-Plugin
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:snake-yaml
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:SubServers-2
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:snakeyaml
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:TestTheTeacher
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:org.openntf.domino
文件:Emitter.java
private String determineBlockHints(String text) {
StringBuilder hints = new StringBuilder();
if (Constant.LINEBR.has(text.charat(0)," ")) {
hints.append(bestIndent);
}
char ch1 = text.charat(text.length() - 1);
if (Constant.LINEBR.hasNo(ch1)) {
hints.append("-");
} else if (text.length() == 1 || Constant.LINEBR.has(text.charat(text.length() - 2))) {
hints.append("+");
}
return hints.toString();
}
项目:AndroidApktool
文件:Mark.java
private boolean isLineBreak(char ch) {
return Constant.NULL_OR_LINEBR.has(ch);
}
项目:AndroidApktool
文件:Emitter.java
void writeLiteral(String text) throws IOException {
String hints = determineBlockHints(text);
writeIndicator("|" + hints,true,false,false);
if (hints.length() > 0 && (hints.charat(hints.length() - 1)) == '+') {
openEnded = true;
}
writeLineBreak(null);
boolean breaks = true;
int start = 0,end = 0;
while (end <= text.length()) {
char ch = 0;
if (end < text.length()) {
ch = text.charat(end);
}
if (breaks) {
if (ch == 0 || Constant.LINEBR.hasNo(ch)) {
String data = text.substring(start,end);
for (char br : data.tochararray()) {
if (br == '\n') {
writeLineBreak(null);
} else {
writeLineBreak(String.valueOf(br));
}
}
if (ch != 0) {
writeIndent();
}
start = end;
}
} else {
if (ch == 0 || Constant.LINEBR.has(ch)) {
stream.write(text,start,end - start);
if (ch == 0) {
writeLineBreak(null);
}
start = end;
}
}
if (ch != 0) {
breaks = Constant.LINEBR.has(ch);
}
end++;
}
}
项目:5zig-TIMV-Plugin
文件:Mark.java
private boolean isLineBreak(int c) {
return Constant.NULL_OR_LINEBR.has(c);
}
项目:5zig-TIMV-Plugin
文件:Emitter.java
项目:snake-yaml
文件:Mark.java
private boolean isLineBreak(char ch) {
return Constant.NULL_OR_LINEBR.has(ch);
}
项目:snake-yaml
文件:Emitter.java
项目:SubServers-2
文件:Mark.java
private boolean isLineBreak(int c) {
return Constant.NULL_OR_LINEBR.has(c);
}
项目:SubServers-2
文件:Emitter.java
void writeLiteral(String text) throws IOException
{
String hints = this.determineBlockHints(text);
this.writeIndicator("|" + hints,false);
if (! hints.isEmpty() && ((hints.charat(hints.length() - 1)) == '+'))
{
this.openEnded = true;
}
this.writeLineBreak(null);
boolean breaks = true;
int start = 0,end = 0;
while (end <= text.length())
{
char ch = 0;
if (end < text.length())
{
ch = text.charat(end);
}
if (breaks)
{
if ((ch == 0) || Constant.LINEBR.hasNo(ch))
{
String data = text.substring(start,end);
for (char br : data.tochararray())
{
if (br == '\n')
{
this.writeLineBreak(null);
}
else
{
this.writeLineBreak(String.valueOf(br));
}
}
if (ch != 0)
{
this.writeIndent();
}
start = end;
}
}
else
{
if ((ch == 0) || Constant.LINEBR.has(ch))
{
this.stream.write(text,end - start);
if (ch == 0)
{
this.writeLineBreak(null);
}
start = end;
}
}
if (ch != 0)
{
breaks = Constant.LINEBR.has(ch);
}
end++;
}
}
项目:snakeyaml
文件:Mark.java
private boolean isLineBreak(char ch) {
return Constant.NULL_OR_LINEBR.has(ch);
}
项目:snakeyaml
文件:Emitter.java
项目:TestTheTeacher
文件:Mark.java
private boolean isLineBreak(char ch) {
return Constant.NULL_OR_LINEBR.has(ch);
}
项目:TestTheTeacher
文件:Emitter.java
项目:org.openntf.domino
文件:Mark.java
private boolean isLineBreak(char ch) {
return Constant.NULL_OR_LINEBR.has(ch);
}
项目:org.openntf.domino
文件:Emitter.java
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。