code: public byte[] drawTileBytes(int x, int y, int zoom) {
  
  		BufferedImage image = drawTile(x, y, zoom);
  
  		byte[] tileData = null;
  
  		// Convert the image to bytes
  		if (image != null) {
  			try {
  				tileData = ImageUtils.writeImageToBytes(image, compressFormat);
  			} catch (IOException e) {
  				LOGGER.log(Level.SEVERE, "Failed to create tile. x: " + x
  						+ ", y: " + y + ", zoom: " + zoom, e);
  			}
  		}
  
  		return tileData;
  	}
docs: Draw the tile and get the bytes from the x, y, and zoom level
  
  @param x
  x coordinate
  @param y
  y coordinate
  @param zoom
  zoom level
  @return tile bytes, or null