Java Code Examples for org.apache.cxf.helpers.FileUtils#getDefaultTempDir()
The following examples show how to use
org.apache.cxf.helpers.FileUtils#getDefaultTempDir() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AegisJaxWsTest.java From cxf with Apache License 2.0 | 6 votes |
@Test public void testBigList() throws Exception { int size = 1000; List<String> l = new ArrayList<>(size); for (int x = 0; x < size; x++) { l.add("Need to create a pretty big soap message to make sure we go over " + "some of the default buffer sizes and such so we can see what really" + "happens when we do that - " + x); } setupForTest(false); List<String> item = client.echoBigList(l); Assert.assertEquals(size, item.size()); //CXF-2768 File f = FileUtils.getDefaultTempDir(); Assert.assertEquals(0, f.listFiles().length); }
Example 2
Source File: PolicyTestHelper.java From cxf with Apache License 2.0 | 5 votes |
public static void updatePolicyRef(String file, String oldData, String newData) throws IOException { File f = FileUtils.getDefaultTempDir(); InputStream in = PolicyTestHelper.class.getResourceAsStream(file); String s = IOUtils.readStringFromStream(in); s = s.replaceAll(oldData, newData); File newFile = new File(f, file); FileWriter fw = new FileWriter(newFile); fw.write(s); fw.close(); }
Example 3
Source File: JAXRSMultipartTest.java From cxf with Apache License 2.0 | 5 votes |
int countTempFiles() { File file = FileUtils.getDefaultTempDir(); File[] files = file.listFiles(); if (files == null) { return 0; } int count = 0; for (File f : files) { if (f.isFile()) { count++; } } return count; }