@Test public void testOpenFile() throws Exception { System.out.println("openFile"); FlexibleFileWriter instance = new FlexibleFileWriter(); instance.setFilename(File.createTempFile(".tmp", "ffw").getAbsolutePath()); instance.openFile(); }
protected void openFile() throws IOException { String filename = getFilename(); FileOutputStream fos = new FileOutputStream(filename, !isOverwrite()); fileChannel = fos.getChannel(); String header = JMeterPluginsUtils.replaceRNT(getFileHeader()); if (!header.isEmpty()) { syncWrite(ByteBuffer.wrap(header.getBytes())); } }
FlexibleFileWriter extends AbstractListenerElement implements SampleListener, Serializable,
        TestStateListener, Remoteable, NoThreadClone { protected void openFile() throws IOException { String filename = getFilename(); FileOutputStream fos = new FileOutputStream(filename, !isOverwrite()); fileChannel = fos.getChannel(); String header = JMeterPluginsUtils.replaceRNT(getFileHeader()); if (!header.isEmpty()) { syncWrite(ByteBuffer.wrap(header.getBytes())); } } }
FlexibleFileWriter extends AbstractListenerElement implements SampleListener, Serializable,
        TestStateListener, Remoteable, NoThreadClone { protected void openFile() throws IOException { String filename = getFilename(); FileOutputStream fos = new FileOutputStream(filename, !isOverwrite()); fileChannel = fos.getChannel(); String header = JMeterPluginsUtils.replaceRNT(getFileHeader()); if (!header.isEmpty()) { syncWrite(ByteBuffer.wrap(header.getBytes())); } } FlexibleFileWriter(); }
FlexibleFileWriter extends AbstractListenerElement implements SampleListener, Serializable,
        TestStateListener, Remoteable, NoThreadClone { protected void openFile() throws IOException { String filename = getFilename(); FileOutputStream fos = new FileOutputStream(filename, !isOverwrite()); fileChannel = fos.getChannel(); String header = JMeterPluginsUtils.replaceRNT(getFileHeader()); if (!header.isEmpty()) { syncWrite(ByteBuffer.wrap(header.getBytes())); } } FlexibleFileWriter(); @Override void sampleStarted(SampleEvent e); @Override void sampleStopped(SampleEvent e); @Override void testStarted(); @Override void testStarted(String host); @Override void testEnded(); @Override void testEnded(String host); void setFilename(String name); String getFilename(); void setColumns(String cols); String getColumns(); boolean isOverwrite(); void setOverwrite(boolean ov); void setFileHeader(String str); String getFileHeader(); void setFileFooter(String str); String getFileFooter(); @Override void sampleOccurred(SampleEvent evt); }
FlexibleFileWriter extends AbstractListenerElement implements SampleListener, Serializable,
        TestStateListener, Remoteable, NoThreadClone { protected void openFile() throws IOException { String filename = getFilename(); FileOutputStream fos = new FileOutputStream(filename, !isOverwrite()); fileChannel = fos.getChannel(); String header = JMeterPluginsUtils.replaceRNT(getFileHeader()); if (!header.isEmpty()) { syncWrite(ByteBuffer.wrap(header.getBytes())); } } FlexibleFileWriter(); @Override void sampleStarted(SampleEvent e); @Override void sampleStopped(SampleEvent e); @Override void testStarted(); @Override void testStarted(String host); @Override void testEnded(); @Override void testEnded(String host); void setFilename(String name); String getFilename(); void setColumns(String cols); String getColumns(); boolean isOverwrite(); void setOverwrite(boolean ov); void setFileHeader(String str); String getFileHeader(); void setFileFooter(String str); String getFileFooter(); @Override void sampleOccurred(SampleEvent evt); static final String AVAILABLE_FIELDS; }