Retrieves the page labels from a PDF as an array of String objects.
@param reader a PdfReader object that has the page labels you want to retrieve
@return	a String array or <code>null</code> if no page labels are present
345261
public static String[] getPageLabels(PdfReader reader) {
    	
		int n = reader.getNumberOfPages();
		
    	PdfDictionary dict = reader.getCatalog();
		PdfDictionary labels = (PdfDictionary)PdfReader.getPdfObjectRelease(dict.get(PdfName.PAGELABELS));
        if (labels == null)
            return null;
		
		String[] labelstrings = new String[n];
		
		HashMap numberTree = PdfNumberTree.readTree(labels);
		
		int pagecount = 1;
		Integer current;
		String prefix = "";
		char type = 'D';
		for (int i = 0; i < n; i++) {
			current = Integer.valueOf(i);
			if (numberTree.containsKey(current)) {
				PdfDictionary d = (PdfDictionary)PdfReader.getPdfObjectRelease((PdfObject)numberTree.get(current));
				if (d.contains(PdfName.ST)) {
					pagecount = ((PdfNumber)d.get(PdfName.ST)).intValue();
				}
				else {
					pagecount = 1;
				}
				if (d.contains(PdfName.P)) {
					prefix = ((PdfString)d.get(PdfName.P)).toUnicodeString();
				}
				if (d.contains(PdfName.S)) {
					type = ((PdfName)d.get(PdfName.S)).toString().charAt(1);
				}
			}
			switch(type) {
			default:
				labelstrings[i] = prefix + pagecount;
				break;
			case 'R':
				labelstrings[i] = prefix + RomanNumberFactory.getUpperCaseString(pagecount);
				break;
			case 'r':
				labelstrings[i] = prefix + RomanNumberFactory.getLowerCaseString(pagecount);
				break;
			case 'A':
				labelstrings[i] = prefix + RomanAlphabetFactory.getUpperCaseString(pagecount);
				break;
			case 'a':
				labelstrings[i] = prefix + RomanAlphabetFactory.getLowerCaseString(pagecount);
				break;
			}
			pagecount++;
		}
		return labelstrings;
    }
1205735
public static Map<String, Object> jsonMap(JsonReader reader) throws IOException {
        Map<String, Object> map = new HashMap<>();
        reader.beginObject();
        while (reader.hasNext() && reader.peek() == JsonToken.NAME) {
            String name = reader.nextName();
            Object value = jsonValue(reader);
            if (value != null) {
                map.put(name, value);
            }
        }
        reader.endObject();
        return map;
    }
41247
protected void setFromReader(PdfReader reader) {
        this.reader = reader;
        indirects = (HashMap)indirectMap.get(reader);
        if (indirects == null) {
            indirects = new HashMap();
            indirectMap.put(reader,indirects);
            PdfDictionary catalog = reader.getCatalog();
            PRIndirectReference ref = null;
            PdfObject o = catalog.get(PdfName.ACROFORM);
            if (o == null || o.type() != PdfObject.INDIRECT)
                return;
            ref = (PRIndirectReference)o;
            if (acroForm == null) acroForm = body.getPdfIndirectReference();
            indirects.put(new RefKey(ref), new IndirectReferences(acroForm));
        }
    }
32519
@Nullable
  public static char [] getAllCharacters (@Nullable @WillClose final Reader aReader)
  {
    if (aReader == null)
      return null;

    return getCopy (aReader).getAsCharArray ();
  }
396937
public JsonReader newJsonReader(Reader reader) {
    JsonReader jsonReader = new JsonReader(reader);
    jsonReader.setLenient(lenient);
    return jsonReader;
  }
856999
public static AnnotationMappingInfo load(final Reader reader) throws XmlOperateException {
        ArgUtils.notNull(reader, "reader");
        
        final AnnotationMappingInfo xmlInfo;
        
        try {
            xmlInfo = JAXB.unmarshal(reader, AnnotationMappingInfo.class);
        } catch (DataBindingException e) {
            throw new XmlOperateException("fail load xml with JAXB.", e);
        }
        
        return xmlInfo;
    }
1050145
public Object parse(Reader reader) {
        if (reader == null) {
            throw new IllegalArgumentException("Reader must not be null");
        }

        Object content;
        JsonParser parser = createParser();
        content = parser.parse(reader);
        return content;
    }
1088435
public String rawElementText(XMLStreamReader reader) throws XMLStreamException {
    String elementText = reader.getElementText();
    elementText = elementText == null || elementText.trim().length() == 0 ? null : elementText.trim();
    return elementText;
  }
998984
public static Map<String, Object> toMap(XmlReaders readers){
        Node root = readers.getNode("xml");
        if (root == null){
            return Collections.emptyMap();
        }
        NodeList children = root.getChildNodes();
        if (children.getLength() == 0){
            return Collections.emptyMap();
        }
        Map<String, Object> data = new HashMap<>(children.getLength());
        Node n;
        for (int i = 0; i<children.getLength(); i++){
            n = children.item(i);
            data.put(n.getNodeName(), n.getTextContent());
        }
        return data;
    }
1051379
public static Stream<String> lines(final Reader reader) {
        N.checkArgNotNull(reader);

        return of(createLazyLineIterator(null, null, Charsets.UTF_8, reader, false));
    }
284713
public static Reader retrieve(String reader) throws StripeException {
    return retrieve(reader, (Map<String, Object>) null, (RequestOptions) null);
  }
199644
public static Properties loadProperties(Reader reader) {
        Properties prop = new Properties();
        try {
            prop.load(reader);
        } catch (IOException e) {
            throw E.ioException(e);
        } finally {
            IO.close(reader);
        }
        return prop;
    }
538365
public <V> V convertFrom(final JsonReader reader) {
        if (reader == null) return null;
        return (V) new AnyDecoder(factory).convertFrom(reader);
    }
1146989
private static String readString(DataInput reader) throws IOException {
		int blocks = reader.readInt();
		String result;
		if (blocks == 0) {
			result = null;
		} else if (blocks < 0) {
			throw new DeserializerException("Wrong 'null' indicator for a string", "0", Integer.toString(blocks));
		} else {
			StringBuilder sb = new StringBuilder();
			for (int i=0; i<blocks; i++) {
				sb.append(reader.readUTF());
			}
			result = sb.toString();
		}
		return result;
	}
974627
private static<V> TreeMap<String, V> getValuesMap (String prefix, ParamReader<V> reader) {

        TreeMap<String, V> map = null;

        Iterator iter = config().getKeys(prefix);
        while(iter.hasNext()){
            String key = iter.next().toString();

            if (map == null) {
                map = new TreeMap(keysComparator); // make sure that all keys are inserted by their configured order
            }

            map.put(key, reader.readValue(key));
        }

        return map;
    }
734581
public Toml read(Reader reader) {
    BufferedReader bufferedReader = null;
    try {
      bufferedReader = new BufferedReader(reader);

      StringBuilder w = new StringBuilder();
      String line = bufferedReader.readLine();
      while (line != null) {
        w.append(line).append('\n');
        line = bufferedReader.readLine();
      }
      read(w.toString());
    } catch (IOException e) {
      throw new RuntimeException(e);
    } finally {
      try {
        bufferedReader.close();
      } catch (IOException e) {}
    }
    return this;
  }
533600
public static Parameters parse(Reader reader) throws AponParseException {
        if (reader == null) {
            throw new IllegalArgumentException("reader must not be null");
        }
        AponReader aponReader = new AponReader(reader);
        return aponReader.read();
    }