private void closeStream() {
		logger.debug("Closing output stream");
		if (fsDataOutputStream != null) {
			try {
				fsDataOutputStream.close();
			} catch (IOException e) {
				IOUtils.closeStream(fsDataOutputStream);
				throw new StoreException("Error while closing stream", e);
			} finally {
				fsDataOutputStream = null;
			}
		}
	}
Converts the list of items to a byte array.

@param items
@return the byte array
spring-xd-hadoop/src/main/java/org/springframework/xd/batch/item/hadoop/HdfsTextItemWriter.java