/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.append(c); } catch (IOException e) { // Android as of API 25 does not support this exception constructor // however we won't worry about it. If an exception is happening here // it will just throw a "Method not found" exception instead. throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param mode Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param mode Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'o' ? "Misplaced endObject." : "Misplaced endArray."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param mode Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param mode Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param mode Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.append(c); } catch (IOException e) { // Android as of API 25 does not support this exception constructor // however we won't worry about it. If an exception is happening here // it will just throw a "Method not found" exception instead. throw new JSONException(e); } this.comma = true; return this; }
/** * End something. * @param m Mode * @param c Closing character * @return this * @throws JSONException If unbalanced. */ private JSONWriter end(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; }