package org.devilry.clientapi;

import javax.naming.NamingException;

import org.devilry.core.daointerfaces.FileDataBlockCommon;

public class DevilryOutputStream extends AbstractDevilryFileStream {

	FileDataBlockCommon fileDataBlock;
	
	DevilryOutputStream(long fileMetaId, DevilryConnection connection) {
		super(fileMetaId, connection);
	}

	private FileDataBlockCommon getFileDataBlockBean() throws NamingException {
		return fileDataBlock == null ? fileDataBlock = connection.getFileDataBlock() : fileDataBlock;
	}
	
	public void write(byte [] data) throws NamingException {
		getFileDataBlockBean().create(fileMetaId, data);
	}
}

@@ -121,16 +121,70 @@
 kCommon;
+%0Aimport org.devilry.core.daointerfaces.FileMetaCommon;
 %0A%0Apublic
@@ -352,16 +352,39 @@
 nection)
+ throws NamingException
  %7B%0A%09%09sup
@@ -592,16 +592,17 @@
 ck;%0A%09%7D%0A%09
+%09
 %0A%09public

Throw Exception