title: How to substring in java based on length?
body: <p>I want to substring(starting chars) a string in java based on length.
  for example if string1 is greater than 4000 bytes I want make that string into less than or equal to 4000 bytes string .(starting chars need to be trimmed not last chars) </p>