本文整理了Java中com.google.android.exoplayer2.util.Util.isLinebreak()
方法的一些代码示例,展示了Util.isLinebreak()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.isLinebreak()
方法的具体详情如下:
包路径:com.google.android.exoplayer2.util.Util
类名称:Util
方法名:isLinebreak
[英]Returns whether the given character is a carriage return ('\r') or a line feed ('\n').
[中]返回给定字符是回车符('\r')还是换行符('\n')。
代码示例来源:origin: google/ExoPlayer
private static int skipIgnorableWhitespace(BufferedReader reader, boolean skipLinebreaks, int c)
throws IOException {
while (c != -1 && Character.isWhitespace(c) && (skipLinebreaks || !Util.isLinebreak(c))) {
c = reader.read();
}
return c;
}
代码示例来源:origin: google/ExoPlayer
private static boolean checkPlaylistHeader(BufferedReader reader) throws IOException {
int last = reader.read();
if (last == 0xEF) {
if (reader.read() != 0xBB || reader.read() != 0xBF) {
return false;
}
// The playlist contains a Byte Order Mark, which gets discarded.
last = reader.read();
}
last = skipIgnorableWhitespace(reader, true, last);
int playlistHeaderLength = PLAYLIST_HEADER.length();
for (int i = 0; i < playlistHeaderLength; i++) {
if (last != PLAYLIST_HEADER.charAt(i)) {
return false;
}
last = reader.read();
}
last = skipIgnorableWhitespace(reader, false, last);
return Util.isLinebreak(last);
}
代码示例来源:origin: google/ExoPlayer
while (lineLimit < limit && !Util.isLinebreak(data[lineLimit])) {
lineLimit++;
内容来源于网络,如有侵权,请联系作者删除!