diff --git a/tools.descartes.dni.core/src/main/java/tools/descartes/dni/dnimm3/tools/Parser.java b/tools.descartes.dni.core/src/main/java/tools/descartes/dni/dnimm3/tools/Parser.java
index e34163233ff0f69012ea9c77fef42fef303bd84b..bfcf4d6e706332ea5dc226938b5571aa1c65e5d6 100644
--- a/tools.descartes.dni.core/src/main/java/tools/descartes/dni/dnimm3/tools/Parser.java
+++ b/tools.descartes.dni.core/src/main/java/tools/descartes/dni/dnimm3/tools/Parser.java
@@ -1,5 +1,7 @@
 package tools.descartes.dni.dnimm3.tools;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.util.Collections;
@@ -16,7 +18,7 @@ import tools.descartes.dni.dnimm3.impl.NetworkInfrastructureImpl;
 
 public class Parser {
 
-	public static NetworkInfrastructureImpl convertFileToModel(File file) {
+	public static NetworkInfrastructureImpl convertToModel(File file) {
 		ResourceSet resourceSet = new ResourceSetImpl();
 		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
 				.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
@@ -25,7 +27,29 @@ public class Parser {
 		return (NetworkInfrastructureImpl) resource.getContents().get(0);
 	}
 
-	public static File convertModelToFile(NetworkInfrastructure networkInfrastructure) throws IOException {
+	public static NetworkInfrastructureImpl convertToModel(byte[] data) throws IOException {
+		ResourceSet resourceSet = new ResourceSetImpl();
+		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
+				.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
+		resourceSet.getPackageRegistry().put(DNIPackage.eNS_URI, DNIPackage.eINSTANCE);
+		Resource resource = resourceSet.createResource(URI.createURI(""));
+		resource.load(new ByteArrayInputStream(data), Collections.EMPTY_MAP);
+		return (NetworkInfrastructureImpl) resource.getContents().get(0);
+	}
+
+	public static byte[] convertToByteArray(NetworkInfrastructure networkInfrastructure) throws IOException {
+		ResourceSet resourceSet = new ResourceSetImpl();
+		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
+				.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
+		resourceSet.getPackageRegistry().put(DNIPackage.eNS_URI, DNIPackage.eINSTANCE);
+		Resource resource = resourceSet.createResource(URI.createURI(""));
+		resource.getContents().add(networkInfrastructure);
+		ByteArrayOutputStream baos = new ByteArrayOutputStream();
+		resource.save(baos, Collections.EMPTY_MAP);
+		return baos.toByteArray();
+	}
+
+	public static File convertToTempFile(NetworkInfrastructure networkInfrastructure) throws IOException {
 		File output = File.createTempFile("dni-", ".dni");
 		output.deleteOnExit();
 		ResourceSet resourceSet = new ResourceSetImpl();
diff --git a/tools.descartes.dni.core/src/test/java/tools/descartes/dni/dnimm3/tools/ParserTest.java b/tools.descartes.dni.core/src/test/java/tools/descartes/dni/dnimm3/tools/ParserTest.java
index a17a1600cf244e34627ef9fa13b0f540f0460356..0edcee188d7f935d137f5d7b742703e28a4e7bb7 100644
--- a/tools.descartes.dni.core/src/test/java/tools/descartes/dni/dnimm3/tools/ParserTest.java
+++ b/tools.descartes.dni.core/src/test/java/tools/descartes/dni/dnimm3/tools/ParserTest.java
@@ -2,6 +2,9 @@ package tools.descartes.dni.dnimm3.tools;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -15,7 +18,7 @@ public class ParserTest {
 	@Test
 	public void shouldConvertFileToModel() {
 		File file = new File("src/test/resources/scenario0A.dni");
-		NetworkInfrastructureImpl networkInfrastructure = Parser.convertFileToModel(file);
+		NetworkInfrastructureImpl networkInfrastructure = Parser.convertToModel(file);
 		Assert.assertEquals(6, networkInfrastructure.getStructure().getNodes().size());
 	}
 
@@ -23,8 +26,24 @@ public class ParserTest {
 	public void shouldConvertModelToFile() throws IOException {
 		DNIFactoryImpl factory = new DNIFactoryImpl();
 		NetworkInfrastructure model = factory.createNetworkInfrastructure();
-		File file = Parser.convertModelToFile(model);
+		File file = Parser.convertToTempFile(model);
 		Assert.assertTrue(file.length() > 100);
 	}
 
+	@Test
+	public void shouldConvertModelToByteArray() throws IOException {
+		DNIFactoryImpl factory = new DNIFactoryImpl();
+		NetworkInfrastructure model = factory.createNetworkInfrastructure();
+		byte[] bytes = Parser.convertToByteArray(model);
+		Assert.assertTrue(bytes.length > 100);
+	}
+
+	@Test
+	public void shouldConvertByteArrayToModel() throws IOException {
+		Path path = Paths.get("src/test/resources/scenario0A.dni");
+		byte[] data = Files.readAllBytes(path);
+		NetworkInfrastructureImpl networkInfrastructure = Parser.convertToModel(data);
+		Assert.assertEquals(6, networkInfrastructure.getStructure().getNodes().size());
+	}
+
 }