/** * Return the {@link File} for the {@link ActiveMQBlobMessage}. * * @param message * @return file * @throws JMSException * @throws IOException */ protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException { if (message.getURL() != null) { try { return new File(message.getURL().toURI()); } catch (URISyntaxException e) { IOException ioe = new IOException("Unable to open file for message " + message); ioe.initCause(e); } } //replace all : with _ to make windows more happy String fileName = message.getJMSMessageID().replaceAll(":", "_"); return new File(rootFile, fileName); } }
/** * Return the {@link File} for the {@link ActiveMQBlobMessage}. * * @param message * @return file * @throws JMSException * @throws IOException */ protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException { if (message.getURL() != null) { try { return new File(message.getURL().toURI()); } catch (URISyntaxException e) { IOException ioe = new IOException("Unable to open file for message " + message); ioe.initCause(e); } } //replace all : with _ to make windows more happy String fileName = message.getJMSMessageID().replaceAll(":", "_"); return new File(rootFile, fileName); } }
/** * Return the {@link File} for the {@link ActiveMQBlobMessage}. * * @param message * @return file * @throws JMSException * @throws IOException */ protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException { if (message.getURL() != null) { try { return new File(message.getURL().toURI()); } catch (URISyntaxException e) { IOException ioe = new IOException("Unable to open file for message " + message); ioe.initCause(e); } } //replace all : with _ to make windows more happy String fileName = message.getJMSMessageID().replaceAll(":", "_"); return new File(rootFile, fileName); } }
/** * Return the {@link File} for the {@link ActiveMQBlobMessage}. * * @param message * @return file * @throws JMSException * @throws IOException */ protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException { if (message.getURL() != null) { try { return new File(message.getURL().toURI()); } catch (URISyntaxException e) { IOException ioe = new IOException("Unable to open file for message " + message); ioe.initCause(e); } } //replace all : with _ to make windows more happy String fileName = message.getJMSMessageID().replaceAll(":", "_"); return new File(rootFile, fileName); } }
/** * Return the {@link File} for the {@link ActiveMQBlobMessage}. * * @param message * @return file * @throws JMSException * @throws IOException */ protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException { if (message.getURL() != null) { try { return new File(message.getURL().toURI()); } catch (URISyntaxException e) { IOException ioe = new IOException("Unable to open file for message " + message); ioe.initCause(e); } } //replace all : with _ to make windows more happy String fileName = message.getJMSMessageID().replaceAll(":", "_"); return new File(rootFile, fileName); } }
String filename = message.getJMSMessageID().replaceAll("[:\\\\/*?|<>]", "_"); int i = RANDOM.nextInt(splitCount) + 1;