@Test public void readerTest() throws IOException { InputStream inputStream = YsldTest.class.getResourceAsStream("point.yml"); YsldInput reader = Ysld.reader(inputStream); reader.close(); try { inputStream.read(); fail("inputStream should be closed"); } catch (IOException e) { } }
static YsldInput reader(Object input) throws IOException { if (input instanceof Reader) { return new YsldInput((Reader) input); } else if (input instanceof InputStream) { return new YsldInput(new BufferedReader(new InputStreamReader((InputStream) input))); } else if (input instanceof File) { return new YsldInput(new BufferedReader(new FileReader((File) input))); } else if (input instanceof String) { return new YsldInput(new StringReader((String) input)); } else { throw new IllegalArgumentException("Unable to turn " + input + " into reader"); } }
Ysld { static YsldInput reader(Object input) throws IOException { if (input instanceof Reader) { return new YsldInput((Reader) input); } else if (input instanceof InputStream) { return new YsldInput(new BufferedReader(new InputStreamReader((InputStream) input))); } else if (input instanceof File) { return new YsldInput(new BufferedReader(new FileReader((File) input))); } else if (input instanceof String) { return new YsldInput(new StringReader((String) input)); } else { throw new IllegalArgumentException("Unable to turn " + input + " into reader"); } } }
Ysld { static YsldInput reader(Object input) throws IOException { if (input instanceof Reader) { return new YsldInput((Reader) input); } else if (input instanceof InputStream) { return new YsldInput(new BufferedReader(new InputStreamReader((InputStream) input))); } else if (input instanceof File) { return new YsldInput(new BufferedReader(new FileReader((File) input))); } else if (input instanceof String) { return new YsldInput(new StringReader((String) input)); } else { throw new IllegalArgumentException("Unable to turn " + input + " into reader"); } }  }
Ysld { static YsldInput reader(Object input) throws IOException { if (input instanceof Reader) { return new YsldInput((Reader) input); } else if (input instanceof InputStream) { return new YsldInput(new BufferedReader(new InputStreamReader((InputStream) input))); } else if (input instanceof File) { return new YsldInput(new BufferedReader(new FileReader((File) input))); } else if (input instanceof String) { return new YsldInput(new StringReader((String) input)); } else { throw new IllegalArgumentException("Unable to turn " + input + " into reader"); } }  static XMLStreamReader xmlReader(Object input); static StyledLayerDescriptor parse(
            Object ysld,
            @Nullable List<ZoomContextFinder> zCtxtFinders,
            @Nullable ResourceLocator locator); static StyledLayerDescriptor parse(
            Object ysld,
            @Nullable List<ZoomContextFinder> zCtxtFinders,
            @Nullable ResourceLocator locator,
            @Nullable UomMapper uomMapper); static StyledLayerDescriptor parse(Object ysld); static void encode(StyledLayerDescriptor sld, Object output); static void encode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper); static void transform(XMLStreamReader sld, Writer ysld); static void transform(InputStream sld, Writer ysld); static List<MarkedYAMLException> validate(Object ysld); static List<MarkedYAMLException> validate(
            Object ysld, List<ZoomContextFinder> zContextFinders, UomMapper uomMapper); }
Ysld { static YsldInput reader(Object input) throws IOException { if (input instanceof Reader) { return new YsldInput((Reader) input); } else if (input instanceof InputStream) { return new YsldInput(new BufferedReader(new InputStreamReader((InputStream) input))); } else if (input instanceof File) { return new YsldInput(new BufferedReader(new FileReader((File) input))); } else if (input instanceof String) { return new YsldInput(new StringReader((String) input)); } else { throw new IllegalArgumentException("Unable to turn " + input + " into reader"); } }  static XMLStreamReader xmlReader(Object input); static StyledLayerDescriptor parse(
            Object ysld,
            @Nullable List<ZoomContextFinder> zCtxtFinders,
            @Nullable ResourceLocator locator); static StyledLayerDescriptor parse(
            Object ysld,
            @Nullable List<ZoomContextFinder> zCtxtFinders,
            @Nullable ResourceLocator locator,
            @Nullable UomMapper uomMapper); static StyledLayerDescriptor parse(Object ysld); static void encode(StyledLayerDescriptor sld, Object output); static void encode(StyledLayerDescriptor sld, Object output, UomMapper uomMapper); static void transform(XMLStreamReader sld, Writer ysld); static void transform(InputStream sld, Writer ysld); static List<MarkedYAMLException> validate(Object ysld); static List<MarkedYAMLException> validate(
            Object ysld, List<ZoomContextFinder> zContextFinders, UomMapper uomMapper); static String OPTION_PREFIX; }