Tabnine Logo
ZoneInfoDB$TzDataAndroid
Code IndexAdd Tabnine to your IDE (free)

How to use
ZoneInfoDB$TzDataAndroid
in
libcore.util

Best Java code snippets using libcore.util.ZoneInfoDB$TzDataAndroid (Showing top 20 results out of 315)

origin: robovm/robovm

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: ibinti/bugvm

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: FlexoVM/flexovm

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: MobiVM/robovm

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: com.gluonhq/robovm-rt

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: com.bugvm/bugvm-rt

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: com.gluonhq/robovm-rt

private boolean loadData(String path) {
 try {
  mappedFile = MemoryMappedFile.mmapRO(path);
 } catch (ErrnoException errnoException) {
  return false;
 }
 try {
  readHeader();
  return true;
 } catch (Exception ex) {
  // Something's wrong with the file.
  // Log the problem and return false so we try the next choice.
  System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  return false;
 }
}
origin: com.mobidevelop.robovm/robovm-rt

private boolean loadData(String path) {
 try {
  mappedFile = MemoryMappedFile.mmapRO(path);
 } catch (ErrnoException errnoException) {
  return false;
 }
 try {
  readHeader();
  return true;
 } catch (Exception ex) {
  // Something's wrong with the file.
  // Log the problem and return false so we try the next choice.
  System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  return false;
 }
}
origin: FlexoVM/flexovm

private boolean loadData(String path) {
 try {
  mappedFile = MemoryMappedFile.mmapRO(path);
 } catch (ErrnoException errnoException) {
  return false;
 }
 try {
  readHeader();
  return true;
 } catch (Exception ex) {
  // Something's wrong with the file.
  // Log the problem and return false so we try the next choice.
  System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  return false;
 }
}
origin: com.gluonhq/robovm-rt

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
origin: com.mobidevelop.robovm/robovm-rt

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
origin: com.bugvm/bugvm-rt

private boolean loadData(String path) {
 try {
  mappedFile = MemoryMappedFile.mmapRO(path);
 } catch (ErrnoException errnoException) {
  return false;
 }
 try {
  readHeader();
  return true;
 } catch (Exception ex) {
  // Something's wrong with the file.
  // Log the problem and return false so we try the next choice.
  System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  return false;
 }
}
origin: ibinti/bugvm

private boolean loadData(String path) {
 try {
  mappedFile = MemoryMappedFile.mmapRO(path);
 } catch (ErrnoException errnoException) {
  return false;
 }
 try {
  readHeader();
  return true;
 } catch (Exception ex) {
  // Something's wrong with the file.
  // Log the problem and return false so we try the next choice.
  System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  return false;
 }
}
origin: FlexoVM/flexovm

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
origin: com.mobidevelop.robovm/robovm-rt

private void readHeader() {
 // byte[12] tzdata_version  -- "tzdata2012f\0"
 // int index_offset
 // int data_offset
 // int zonetab_offset
 BufferIterator it = mappedFile.bigEndianIterator();
 byte[] tzdata_version = new byte[12];
 it.readByteArray(tzdata_version, 0, tzdata_version.length);
 String magic = new String(tzdata_version, 0, 6, StandardCharsets.US_ASCII);
 if (!magic.equals("tzdata") || tzdata_version[11] != 0) {
  throw new RuntimeException("bad tzdata magic: " + Arrays.toString(tzdata_version));
 }
 version = new String(tzdata_version, 6, 5, StandardCharsets.US_ASCII);
 int index_offset = it.readInt();
 int data_offset = it.readInt();
 int zonetab_offset = it.readInt();
 readIndex(it, index_offset, data_offset);
 readZoneTab(it, zonetab_offset, (int) mappedFile.size() - zonetab_offset);
}
origin: ibinti/bugvm

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
origin: com.bugvm/bugvm-rt

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
origin: MobiVM/robovm

private boolean loadData(String path) {
 try {
  mappedFile = MemoryMappedFile.mmapRO(path);
 } catch (ErrnoException errnoException) {
  return false;
 }
 try {
  readHeader();
  return true;
 } catch (Exception ex) {
  // Something's wrong with the file.
  // Log the problem and return false so we try the next choice.
  System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  return false;
 }
}
origin: MobiVM/robovm

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
origin: robovm/robovm

public TzDataAndroid(String... paths) {
 for (String path : paths) {
  if (loadData(path)) {
   return;
  }
 }
 // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
 // This is actually implemented in TimeZone itself, so if this is the only time zone
 // we report, we won't be asked any more questions.
 System.logE("Couldn't find any tzdata!");
 version = "missing";
 zoneTab = "# Emergency fallback data.\n";
 ids = new String[] { "GMT" };
 byteOffsets = rawUtcOffsets = new int[1];
}
libcore.utilZoneInfoDB$TzDataAndroid

Most used methods

  • loadData
  • readHeader
  • readIndex
  • readZoneTab

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now