*/
package org.opendaylight.controller.sal.connect.netconf;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.StringBufferInputStream;
import org.opendaylight.yangtools.concepts.Delegator;
import org.opendaylight.yangtools.yang.common.QName;
+import com.google.common.base.Charsets;
+
/**
*
*
final QName moduleIdentifier;
final InputStream delegate;
-
-
private YangModelInputStreamAdapter(String source, QName moduleIdentifier, InputStream delegate) {
super();
this.source = source;
}
public static YangModelInputStreamAdapter create(QName name, String module) {
- InputStream stringInput = new StringBufferInputStream(module);
- return new YangModelInputStreamAdapter(null, name, stringInput );
+ return new YangModelInputStreamAdapter(null, name, new ByteArrayInputStream(module.getBytes(Charsets.UTF_8)));
}
}