protected static OutputStream getStream(File file, int flags) throws IOException
	{
		OutputStream output = new FileOutputStream(file);
		if ((flags & NBTSerializer.BUFFERED) != 0)
		{
			output = new BufferedOutputStream(output);
		}
		if ((flags & NBTSerializer.COMPRESSED) != 0)
		{
			output = new GZIPOutputStream(output);
		}
		if ((flags & NBTSerializer.BUFFERED2) != 0)
		{
			output = new BufferedOutputStream(output);
		}
		return output;
	}