Bug 4139 EC DCR: Code templates feature (1GIVMDV)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
InputStream inputStream= getDefaultsAsStream();
				
				if (inputStream == null)
					return new TemplateSet();					
				if (!templateFile.createNewFile())
					return new TemplateSet();
				OutputStream outputStream= new FileOutputStream(templateFile);
			
								
				byte buffer[]= new byte[65536];
				while (true) {
					int bytes= inputStream.read(buffer);
					if (bytes == -1)
						break;
					outputStream.write(buffer, 0, bytes);
				}
			
				inputStream.close();
				outputStream.close();
			}
			
			Assert.isTrue(templateFile.exists());
			TemplateSet templateSet= new TemplateSet();
			templateSet.addFromStream(new FileInputStream(templateFile));
			return templateSet;
		} catch (IOException e) {
			JavaPlugin.log(e);
			return null;
		}
	}