public static String propertiesToString(Properties props) throws IOException { String result = ""; if (props != null) { DataByteArrayOutputStream dataOut = new DataByteArrayOutputStream(); props.store(dataOut, ""); result = new String(dataOut.getData(), 0, dataOut.size()); dataOut.close(); } return result; }
public static String propertiesToString(Properties props) throws IOException { String result = ""; if (props != null) { DataByteArrayOutputStream dataOut = new DataByteArrayOutputStream(); props.store(dataOut, ""); result = new String(dataOut.getData(), 0, dataOut.size()); dataOut.close(); } return result; }
public void storeContent() throws JMSException { if (dataOut != null) { try { dataOut.close(); Buffer bs = dataOut.toBuffer(); setContent(bs); dataOut = null; } catch (IOException ioe) { throw StompJmsExceptionSupport.create(ioe.getMessage(), ioe); } } }
public void storeContent() throws JMSException { if (dataOut != null) { try { dataOut.close(); Buffer bs = dataOut.toBuffer(); setContent(bs); dataOut = null; } catch (IOException ioe) { throw StompJmsExceptionSupport.create(ioe.getMessage(), ioe); } } }
public void storeContent() throws JMSException { try { if (bytesOut != null) { bytesOut.close(); Buffer bs = bytesOut.toBuffer(); setContent(bs); bytesOut = null; } } catch (IOException ioe) { throw StompJmsExceptionSupport.create(ioe); } }
public void storeContent() throws JMSException { try { if (bytesOut != null) { bytesOut.close(); Buffer bs = bytesOut.toBuffer(); setContent(bs); bytesOut = null; } } catch (IOException ioe) { throw StompJmsExceptionSupport.create(ioe); } }
private void writePageFileHeader(int freePageExtent) throws IOException { DataByteArrayOutputStream os = new DataByteArrayOutputStream(); os.write(HAWT_DB_PAGE_FILE_MAGIC); os.writeInt(freePageExtent); os.writeInt(headerSize); os.writeShort(pageSize); os.close(); mappedFileFactory.getMemoryMappedFile().write(0, os.toBuffer()); }
private void writePageFileHeader(int freePageExtent) throws IOException { DataByteArrayOutputStream os = new DataByteArrayOutputStream(); os.write(HAWT_DB_PAGE_FILE_MAGIC); os.writeInt(freePageExtent); os.writeInt(headerSize); os.writeShort(pageSize); os.close(); mappedFileFactory.getMemoryMappedFile().write(0, os.toBuffer()); }