jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
117 String getTempFileSuffix() { |
117 String getTempFileSuffix() { |
118 return suffix; |
118 return suffix; |
119 } |
119 } |
120 |
120 |
121 /** |
121 /** |
122 * @param dir |
122 * @param directory |
|
123 * temp directory |
123 */ |
124 */ |
124 public final void setDir(String dir) { |
125 public final void setDir(String directory) { |
125 if (tempDir == null && dir != null && !dir.equals("")) { |
126 if (tempDir == null && directory != null && !directory.equals("")) { |
126 tempDir = new File(dir); |
127 tempDir = new File(directory); |
127 } |
128 } |
128 } |
129 } |
129 |
130 |
130 /** |
131 /** |
131 * Validates if it can create temporary files. Otherwise, it stores |
132 * Validates if it can create temporary files. Otherwise, it stores |
141 if (!deleted) { |
142 if (!deleted) { |
142 if (LOGGER.isLoggable(Level.INFO)) { |
143 if (LOGGER.isLoggable(Level.INFO)) { |
143 LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath()); |
144 LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath()); |
144 } |
145 } |
145 } |
146 } |
146 } catch(Exception ioe) { |
147 } catch(RuntimeException e) { |
|
148 memoryThreshold = -1L; // whole attachment will be in-memory |
|
149 } catch(Exception e) { |
147 memoryThreshold = -1L; // whole attachment will be in-memory |
150 memoryThreshold = -1L; // whole attachment will be in-memory |
148 } |
151 } |
149 } |
152 } |
150 } |
153 } |
151 |
154 |