/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.isNextNonSpace('(')) { List<Namespace> v = new ArrayList<>(); do { Namespace ns = new Namespace(r); v.add(ns); } while (!r.isNextNonSpace(')')); return v.toArray(new Namespace[v.size()]); } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { r.skipSpaces(); // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.peekByte() == '(') { Vector v = new Vector(); r.readByte(); do { Namespace ns = new Namespace(r); v.addElement(ns); } while (r.peekByte() != ')'); r.readByte(); Namespace[] nsa = new Namespace[v.size()]; v.copyInto(nsa); return nsa; } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.isNextNonSpace('(')) { List<Namespace> v = new ArrayList<>(); do { Namespace ns = new Namespace(r); v.add(ns); } while (!r.isNextNonSpace(')')); return v.toArray(new Namespace[v.size()]); } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.isNextNonSpace('(')) { List<Namespace> v = new ArrayList<>(); do { Namespace ns = new Namespace(r); v.add(ns); } while (!r.isNextNonSpace(')')); return v.toArray(new Namespace[v.size()]); } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { r.skipSpaces(); // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.peekByte() == '(') { Vector v = new Vector(); r.readByte(); do { Namespace ns = new Namespace(r); v.addElement(ns); } while (r.peekByte() != ')'); r.readByte(); Namespace[] nsa = new Namespace[v.size()]; v.copyInto(nsa); return nsa; } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.isNextNonSpace('(')) { List<Namespace> v = new ArrayList<>(); do { Namespace ns = new Namespace(r); v.add(ns); } while (!r.isNextNonSpace(')')); return v.toArray(new Namespace[v.size()]); } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.isNextNonSpace('(')) { List<Namespace> v = new ArrayList<>(); do { Namespace ns = new Namespace(r); v.add(ns); } while (!r.isNextNonSpace(')')); return v.toArray(new Namespace[v.size()]); } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }
/** * Parse out one of the three sets of namespaces. */ private Namespace[] getNamespaces(Response r) throws ProtocolException { r.skipSpaces(); // Namespace = nil / "(" 1*( Namespace_Element) ")" if (r.peekByte() == '(') { List<Namespace> v = new ArrayList<Namespace>(); r.readByte(); do { Namespace ns = new Namespace(r); v.add(ns); } while (r.peekByte() != ')'); r.readByte(); return v.toArray(new Namespace[v.size()]); } else { String s = r.readAtom(); if (s == null) throw new ProtocolException("Expected NIL, got null"); if (!s.equalsIgnoreCase("NIL")) throw new ProtocolException("Expected NIL, got " + s); return null; } } }