public synchronized long getStartOfNextLine(long startByte) throws IOException {
				
		// If the start byte is 0 (or less), just start from here - no need to track forward.
		if (startByte <= 0) {
			return 0;
		}
		
		final int BUFFER_SIZE = 8192;
				
		// Now create a byte array to hold the line we'll read.
		byte[] linePlus = new byte[BUFFER_SIZE];

		// Move the file pointer to our start location and read.
		raf.seek(startByte);
		raf.read(linePlus);
		
		// Move forward through the line until we hit a line feed. When we do, just return
		// the file position immediately past it.
		for (int i = 0; i < linePlus.length; i++) {
			byte c = linePlus[i];
			if (c == '\r' || c == '\n') {
				return startByte + i + 1;
			}
		}
		
		// If we haven't found a line feed, then we most likely (definitely) started reading 
		// somewhere in the last line of the file, so just return the original byte given.
		return startByte;
	}
Returns the start of the next line after the given byte. To do this, simply read 
backwards from the given point until a newline or carriage return is found.

@param startByte
@return
@throws IOException
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/logviewer/model/ChunkReader.java