@Override public void writeChars(String s) throws IOException { try { getRaf().writeChars(s); } catch (IOException ioe) { handleException(); throw ioe; } }
@Before public void setup() throws IOException { // needed to satisfy the framework only - input ignored in mapper String dir = DIR.getRoot().getPath(); File infile = new File(dir + "/in"); RandomAccessFile file = new RandomAccessFile(infile, "rw"); // add some data so framework actually calls our mapper file.writeChars("aa bb cc\ndd ee ff\n"); file.close(); }
public void writeChars(String s) throws IOException { delegate.writeChars(s); }
@Override public void writeChars(final String s) throws IOException { raf.writeChars(s); }
@Override public void writeChars(final String s) throws IOException { raf.writeChars(s); }
@Override public void writeChars(String s) throws IOException { raf.writeChars(s); }
@Override public void writeChars(final String s) throws IOException { raf.writeChars(s); }
@Override public void writeChars(String s) throws IOException { raf.writeChars(s); }
@Override public void writeChars(final String s) throws IOException { raf.writeChars(s); }
@Override public void writeChars(@NonNull String s) throws IOException { raf.writeChars(s); }
private void writeData(RandomAccessFile f, String n) throws IOException { StringBuffer buf = null; if ( n != null ) buf = new StringBuffer( n ); else { buf = new StringBuffer( 20 ); buf.setLength( 20 ); } f.writeChars( buf.toString() ); }
private void writeData(RandomAccessFile f, String n) throws IOException { StringBuffer buf = null; if ( n != null ) buf = new StringBuffer( n ); else buf = new StringBuffer( 20 ); buf.setLength( 20 ); f.writeChars( buf.toString() );
RandomAccessFile raf = new RandomAccessFile("filename.txt", "rw"); String tmp; while (tmp = raf.readLine() != null) { // Store String data } // do some string conversion raf.seek(0); raf.writeChars("newString");
RandomAccessFile logfile; public void initLogger(String logPath) { File fl = new File(logPath); long fileLength = fl.length(); logfile = new RandomAccessFile(fl, "rw"); logfile.seek(fileLength); } public void log(String text) throws IOException { logfile.writeChars(text); logfile.writeChar('\n'); }
@Override public void writeChars(final String s) throws IOException { writer().writeChars(s); }
@Override public void writeChars(final String s) throws IOException { writer().writeChars(s); }
@Override public void writeChars(String s) throws IOException { try { getRaf().writeChars(s); } catch (IOException ioe) { handleException(); throw ioe; } }
@Override public void writeChars(String s) throws IOException { try { getRaf().writeChars(s); } catch (IOException ioe) { handleException(); throw ioe; } }
@Override public void writeChars(String s) throws IOException { try { getRaf().writeChars(s); } catch (IOException ioe) { handleException(); throw ioe; } }
@Test(expected = FileReactiveAuditException.class) public void writeChars() throws IOException { ReactiveAudit.off.commit(); try (RandomAccessFile rw = newRandomAccessFile()) { TestTools.strict.commit(); rw.writeChars(""); } }