Here you can find the source of getReaderFromString(String s)
Parameter | Description |
---|---|
s | the string or null |
public static Reader getReaderFromString(String s)
//package com.java2s; /*//from ww w . ja va2s.co m * Copyright 2004-2013 H2 Group. Multiple-Licensed under the H2 License, * Version 1.0, and under the Eclipse Public License, Version 1.0 * (http://h2database.com/html/license.html). * Initial Developer: H2 Group */ import java.io.Reader; import java.io.StringReader; public class Main { /** * Create a reader to read from a string. * If the string is null, this method returns null. * * @param s the string or null * @return the reader */ public static Reader getReaderFromString(String s) { return s == null ? null : new StringReader(s); } }