@Test public void testToString() throws Exception { Assert.assertEquals("Hello SwitchYard", ReaderTransforms.TRANSFORMER.toString(newReader("Hello SwitchYard"))); }
@Transformer public String toString(Reader reader) { StringBuilder builder = new StringBuilder(); try { char[] readBuffer = new char[56]; int readCount; while ((readCount = reader.read(readBuffer)) != -1) { builder.append(readBuffer, 0, readCount); } } catch (IOException e) { LOGGER.debug("Error reading from reader.", e); } finally { try { reader.close(); } catch (IOException e) { LOGGER.debug("Failed to close reader instance.", e); } } return builder.toString(); }
ReaderTransforms { @Transformer public String toString(Reader reader) { StringBuilder builder = new StringBuilder(); try { char[] readBuffer = new char[56]; int readCount; while ((readCount = reader.read(readBuffer)) != -1) { builder.append(readBuffer, 0, readCount); } } catch (IOException e) { LOGGER.debug("Error reading from reader.", e); } finally { try { reader.close(); } catch (IOException e) { LOGGER.debug("Failed to close reader instance.", e); } } return builder.toString(); } }
ReaderTransforms { @Transformer public String toString(Reader reader) { StringBuilder builder = new StringBuilder(); try { char[] readBuffer = new char[56]; int readCount; while ((readCount = reader.read(readBuffer)) != -1) { builder.append(readBuffer, 0, readCount); } } catch (IOException e) { LOGGER.debug("Error reading from reader.", e); } finally { try { reader.close(); } catch (IOException e) { LOGGER.debug("Failed to close reader instance.", e); } } return builder.toString(); }  }
ReaderTransforms { @Transformer public String toString(Reader reader) { StringBuilder builder = new StringBuilder(); try { char[] readBuffer = new char[56]; int readCount; while ((readCount = reader.read(readBuffer)) != -1) { builder.append(readBuffer, 0, readCount); } } catch (IOException e) { LOGGER.debug("Error reading from reader.", e); } finally { try { reader.close(); } catch (IOException e) { LOGGER.debug("Failed to close reader instance.", e); } } return builder.toString(); }  @Transformer String toString(Reader reader); @Transformer InputStream toInputStream(Reader reader); @Transformer InputSource toInputSource(Reader reader); @Transformer Integer toInteger(Reader reader); @Transformer Long toLong(Reader reader); @Transformer Short toShort(Reader reader); @Transformer char[] toChars(Reader reader); @Transformer Character toCharacter(Reader reader); @Transformer byte[] toBytes(Reader reader); @Transformer Double toDouble(Reader reader); @Transformer Float toFloat(Reader reader); }
ReaderTransforms { @Transformer public String toString(Reader reader) { StringBuilder builder = new StringBuilder(); try { char[] readBuffer = new char[56]; int readCount; while ((readCount = reader.read(readBuffer)) != -1) { builder.append(readBuffer, 0, readCount); } } catch (IOException e) { LOGGER.debug("Error reading from reader.", e); } finally { try { reader.close(); } catch (IOException e) { LOGGER.debug("Failed to close reader instance.", e); } } return builder.toString(); }  @Transformer String toString(Reader reader); @Transformer InputStream toInputStream(Reader reader); @Transformer InputSource toInputSource(Reader reader); @Transformer Integer toInteger(Reader reader); @Transformer Long toLong(Reader reader); @Transformer Short toShort(Reader reader); @Transformer char[] toChars(Reader reader); @Transformer Character toCharacter(Reader reader); @Transformer byte[] toBytes(Reader reader); @Transformer Double toDouble(Reader reader); @Transformer Float toFloat(Reader reader); static final ReaderTransforms TRANSFORMER; }