Java Code Examples for com.google.android.exoplayer2.util.Util#isLinebreak()
The following examples show how to use
com.google.android.exoplayer2.util.Util#isLinebreak() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HlsPlaylistParser.java From MediaSDK with Apache License 2.0 | 6 votes |
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); }
Example 2
Source File: HlsPlaylistParser.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
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); }
Example 3
Source File: HlsPlaylistParser.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
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); }
Example 4
Source File: HlsPlaylistParser.java From K-Sonic with MIT License | 6 votes |
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); }
Example 5
Source File: HlsPlaylistParser.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
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); }
Example 6
Source File: HlsPlaylistParser.java From Telegram with GNU General Public License v2.0 | 6 votes |
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); }
Example 7
Source File: HlsPlaylistParser.java From MediaSDK with Apache License 2.0 | 5 votes |
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; }
Example 8
Source File: HlsPlaylistParser.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
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; }
Example 9
Source File: HlsPlaylistParser.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
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; }
Example 10
Source File: HlsPlaylistParser.java From K-Sonic with MIT License | 5 votes |
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; }
Example 11
Source File: HlsPlaylistParser.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
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; }
Example 12
Source File: HlsPlaylistParser.java From Telegram with GNU General Public License v2.0 | 5 votes |
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; }