1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java Thu Apr 04 19:05:24 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java Tue Apr 09 14:51:13 2013 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -28,6 +28,7 @@ 1.11 import java.nio.ByteBuffer; 1.12 import java.io.File; 1.13 import java.io.IOException; 1.14 +import java.util.logging.Level; 1.15 import java.util.logging.Logger; 1.16 1.17 /** 1.18 @@ -50,14 +51,17 @@ 1.19 } 1.20 1.21 // size of the chunk given by the parser 1.22 + @Override 1.23 public int size() { 1.24 return len; 1.25 } 1.26 1.27 + @Override 1.28 public byte[] read() { 1.29 return data; 1.30 } 1.31 1.32 + @Override 1.33 public long writeTo(DataFile file) { 1.34 return file.writeTo(data, 0, len); 1.35 } 1.36 @@ -68,6 +72,7 @@ 1.37 * @param buf 1.38 * @return 1.39 */ 1.40 + @Override 1.41 public Data createNext(DataHead dataHead, ByteBuffer buf) { 1.42 if (!config.isOnlyMemory() && dataHead.inMemory >= config.memoryThreshold) { 1.43 try { 1.44 @@ -79,7 +84,7 @@ 1.45 : File.createTempFile(prefix, suffix, dir); 1.46 // delete the temp file when VM exits as a last resort for file clean up 1.47 tempFile.deleteOnExit(); 1.48 - LOGGER.fine("Created temp file = "+tempFile); 1.49 + if (LOGGER.isLoggable(Level.FINE)) {LOGGER.log(Level.FINE, "Created temp file = {0}", tempFile);} 1.50 dataHead.dataFile = new DataFile(tempFile); 1.51 } catch(IOException ioe) { 1.52 throw new MIMEParsingException(ioe);